From owner-svn-src-stable-10@freebsd.org Sun Mar 26 01:11:00 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 96CCCD12F31; Sun, 26 Mar 2017 01:11:00 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 636EA1810; Sun, 26 Mar 2017 01:11:00 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2Q1Axqi085982; Sun, 26 Mar 2017 01:10:59 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2Q1AxqM085981; Sun, 26 Mar 2017 01:10:59 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201703260110.v2Q1AxqM085981@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 26 Mar 2017 01:10:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r315972 - stable/10/sys/dev/cpuctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Mar 2017 01:11:00 -0000 Author: kib Date: Sun Mar 26 01:10:59 2017 New Revision: 315972 URL: https://svnweb.freebsd.org/changeset/base/315972 Log: MFC r315588: Update the list of cpudev ioctls which require write access. Modified: stable/10/sys/dev/cpuctl/cpuctl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/cpuctl/cpuctl.c ============================================================================== --- stable/10/sys/dev/cpuctl/cpuctl.c Sun Mar 26 00:59:15 2017 (r315971) +++ stable/10/sys/dev/cpuctl/cpuctl.c Sun Mar 26 01:10:59 2017 (r315972) @@ -155,8 +155,9 @@ cpuctl_ioctl(struct cdev *dev, u_long cm return (ENXIO); } /* Require write flag for "write" requests. */ - if ((cmd == CPUCTL_WRMSR || cmd == CPUCTL_UPDATE) && - ((flags & FWRITE) == 0)) + if ((cmd == CPUCTL_MSRCBIT || cmd == CPUCTL_MSRSBIT || + cmd == CPUCTL_UPDATE || cmd == CPUCTL_WRMSR) && + (flags & FWRITE) == 0) return (EPERM); switch (cmd) { case CPUCTL_RDMSR: From owner-svn-src-stable-10@freebsd.org Sun Mar 26 08:51:24 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0590DD1E4FA; Sun, 26 Mar 2017 08:51:24 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D12C217B2; Sun, 26 Mar 2017 08:51:23 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2Q8pMXU073203; Sun, 26 Mar 2017 08:51:22 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2Q8pMOF073201; Sun, 26 Mar 2017 08:51:22 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201703260851.v2Q8pMOF073201@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sun, 26 Mar 2017 08:51:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r315976 - stable/10/sys/dev/isp X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Mar 2017 08:51:24 -0000 Author: mav Date: Sun Mar 26 08:51:22 2017 New Revision: 315976 URL: https://svnweb.freebsd.org/changeset/base/315976 Log: MFC r315163: Remove strange config_intrhook_establish() magic. Interrupts are enabled as part of chip reset just during driver attach. Later "enabling" of already enabled interrupts is useless. Modified: stable/10/sys/dev/isp/isp_freebsd.c stable/10/sys/dev/isp/isp_freebsd.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/isp/isp_freebsd.c ============================================================================== --- stable/10/sys/dev/isp/isp_freebsd.c Sun Mar 26 08:50:50 2017 (r315975) +++ stable/10/sys/dev/isp/isp_freebsd.c Sun Mar 26 08:51:22 2017 (r315976) @@ -278,25 +278,11 @@ isp_attach(ispsoftc_t *isp) int du = device_get_unit(isp->isp_dev); int chan; - isp->isp_osinfo.ehook.ich_func = isp_intr_enable; - isp->isp_osinfo.ehook.ich_arg = isp; - /* - * Haha. Set this first, because if we're loaded as a module isp_intr_enable - * will be called right awawy, which will clear isp_osinfo.ehook_active, - * which would be unwise to then set again later. - */ - isp->isp_osinfo.ehook_active = 1; - if (config_intrhook_establish(&isp->isp_osinfo.ehook) != 0) { - isp_prt(isp, ISP_LOGERR, "could not establish interrupt enable hook"); - return (-EIO); - } - /* * Create the device queue for our SIM(s). */ isp->isp_osinfo.devq = cam_simq_alloc(isp->isp_maxcmds); if (isp->isp_osinfo.devq == NULL) { - config_intrhook_disestablish(&isp->isp_osinfo.ehook); return (EIO); } @@ -330,10 +316,6 @@ unwind: ISP_UNLOCK(isp); cam_sim_free(sim, FALSE); } - if (isp->isp_osinfo.ehook_active) { - config_intrhook_disestablish(&isp->isp_osinfo.ehook); - isp->isp_osinfo.ehook_active = 0; - } if (isp->isp_osinfo.cdev) { destroy_dev(isp->isp_osinfo.cdev); isp->isp_osinfo.cdev = NULL; @@ -371,10 +353,6 @@ isp_detach(ispsoftc_t *isp) destroy_dev(isp->isp_osinfo.cdev); isp->isp_osinfo.cdev = NULL; } - if (isp->isp_osinfo.ehook_active) { - config_intrhook_disestablish(&isp->isp_osinfo.ehook); - isp->isp_osinfo.ehook_active = 0; - } if (isp->isp_osinfo.devq != NULL) { cam_simq_free(isp->isp_osinfo.devq); isp->isp_osinfo.devq = NULL; @@ -790,28 +768,6 @@ ispioctl(struct cdev *dev, u_long c, cad return (retval); } -static void -isp_intr_enable(void *arg) -{ - int chan; - ispsoftc_t *isp = arg; - ISP_LOCK(isp); - if (IS_FC(isp)) { - for (chan = 0; chan < isp->isp_nchan; chan++) { - if (FCPARAM(isp, chan)->role != ISP_ROLE_NONE) { - ISP_ENABLE_INTS(isp); - break; - } - } - } else { - ISP_ENABLE_INTS(isp); - } - isp->isp_osinfo.ehook_active = 0; - ISP_UNLOCK(isp); - /* Release our hook so that the boot can continue. */ - config_intrhook_disestablish(&isp->isp_osinfo.ehook); -} - /* * Local Inlines */ Modified: stable/10/sys/dev/isp/isp_freebsd.h ============================================================================== --- stable/10/sys/dev/isp/isp_freebsd.h Sun Mar 26 08:50:50 2017 (r315975) +++ stable/10/sys/dev/isp/isp_freebsd.h Sun Mar 26 08:51:22 2017 (r315976) @@ -272,7 +272,6 @@ struct isposinfo { struct mtx lock; device_t dev; struct cdev * cdev; - struct intr_config_hook ehook; struct cam_devq * devq; /* @@ -312,7 +311,6 @@ struct isposinfo { sixtyfourbit : 1, /* sixtyfour bit platform */ timer_active : 1, autoconf : 1, - ehook_active : 1, mbox_sleeping : 1, mbox_sleep_ok : 1, mboxcmd_done : 1, From owner-svn-src-stable-10@freebsd.org Sun Mar 26 08:52:46 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 590F7D1E70B; Sun, 26 Mar 2017 08:52:46 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 17E631BD4; Sun, 26 Mar 2017 08:52:46 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2Q8qjOn077156; Sun, 26 Mar 2017 08:52:45 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2Q8qiGf077152; Sun, 26 Mar 2017 08:52:44 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201703260852.v2Q8qiGf077152@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sun, 26 Mar 2017 08:52:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r315978 - stable/10/sys/dev/isp X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Mar 2017 08:52:46 -0000 Author: mav Date: Sun Mar 26 08:52:44 2017 New Revision: 315978 URL: https://svnweb.freebsd.org/changeset/base/315978 Log: MFC r315160: Remove code for unsupported FreeBSD versions. Modified: stable/10/sys/dev/isp/isp.c stable/10/sys/dev/isp/isp_freebsd.c stable/10/sys/dev/isp/isp_freebsd.h stable/10/sys/dev/isp/isp_target.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/isp/isp.c ============================================================================== --- stable/10/sys/dev/isp/isp.c Sun Mar 26 08:52:14 2017 (r315977) +++ stable/10/sys/dev/isp/isp.c Sun Mar 26 08:52:44 2017 (r315978) @@ -4514,15 +4514,7 @@ isp_start(XS_T *xs) t7->req_tidlo = lp->portid; t7->req_tidhi = lp->portid >> 16; t7->req_vpidx = ISP_GET_VPIDX(isp, XS_CHANNEL(xs)); -#if __FreeBSD_version >= 1000700 be64enc(t7->req_lun, CAM_EXTLUN_BYTE_SWIZZLE(XS_LUN(xs))); -#else - if (XS_LUN(xs) >= 256) { - t7->req_lun[0] = XS_LUN(xs) >> 8; - t7->req_lun[0] |= 0x40; - } - t7->req_lun[1] = XS_LUN(xs); -#endif if (FCPARAM(isp, XS_CHANNEL(xs))->fctape_enabled && (lp->prli_word3 & PRLI_WD3_RETRY)) { if (FCP_NEXT_CRN(isp, &t7->req_crn, xs)) { isp_prt(isp, ISP_LOG_WARN1, @@ -4555,19 +4547,11 @@ isp_start(XS_T *xs) ispreqt2e_t *t2e = (ispreqt2e_t *)local; t2e->req_target = lp->handle; t2e->req_scclun = XS_LUN(xs); -#if __FreeBSD_version < 1000700 - if (XS_LUN(xs) >= 256) - t2e->req_scclun |= 0x4000; -#endif cdbp = t2e->req_cdb; } else if (ISP_CAP_SCCFW(isp)) { ispreqt2_t *t2 = (ispreqt2_t *)local; t2->req_target = lp->handle; t2->req_scclun = XS_LUN(xs); -#if __FreeBSD_version < 1000700 - if (XS_LUN(xs) >= 256) - t2->req_scclun |= 0x4000; -#endif cdbp = t2->req_cdb; } else { t2->req_target = lp->handle; Modified: stable/10/sys/dev/isp/isp_freebsd.c ============================================================================== --- stable/10/sys/dev/isp/isp_freebsd.c Sun Mar 26 08:52:14 2017 (r315977) +++ stable/10/sys/dev/isp/isp_freebsd.c Sun Mar 26 08:52:44 2017 (r315978) @@ -369,9 +369,7 @@ isp_freeze_loopdown(ispsoftc_t *isp, int isp_prt(isp, ISP_LOGDEBUG0, "Chan %d Freeze simq (loopdown)", chan); fc->simqfrozen = SIMQFRZ_LOOPDOWN; -#if __FreeBSD_version >= 1000039 xpt_hold_boot(); -#endif xpt_freeze_simq(fc->sim, 1); } else { isp_prt(isp, ISP_LOGDEBUG0, @@ -392,9 +390,7 @@ isp_unfreeze_loopdown(ispsoftc_t *isp, i isp_prt(isp, ISP_LOGDEBUG0, "Chan %d Release simq", chan); xpt_release_simq(fc->sim, 1); -#if __FreeBSD_version >= 1000039 xpt_release_boot(); -#endif } } } @@ -1692,10 +1688,6 @@ isp_target_putback_atio(union ccb *ccb) at->at_header.rqs_entry_count = 1; if (ISP_CAP_SCCFW(isp)) { at->at_scclun = (uint16_t) ccb->ccb_h.target_lun; -#if __FreeBSD_version < 1000700 - if (at->at_scclun >= 256) - at->at_scclun |= 0x4000; -#endif } else { at->at_lun = (uint8_t) ccb->ccb_h.target_lun; } @@ -1744,9 +1736,6 @@ isp_handle_platform_atio2(ispsoftc_t *is fcp = FCPARAM(isp, 0); if (ISP_CAP_SCCFW(isp)) { lun = aep->at_scclun; -#if __FreeBSD_version < 1000700 - lun &= 0x3fff; -#endif } else { lun = aep->at_lun; } @@ -1882,12 +1871,7 @@ isp_handle_platform_atio7(ispsoftc_t *is did = (aep->at_hdr.d_id[0] << 16) | (aep->at_hdr.d_id[1] << 8) | aep->at_hdr.d_id[2]; sid = (aep->at_hdr.s_id[0] << 16) | (aep->at_hdr.s_id[1] << 8) | aep->at_hdr.s_id[2]; -#if __FreeBSD_version >= 1000700 lun = CAM_EXTLUN_BYTE_SWIZZLE(be64dec(aep->at_cmnd.fcp_cmnd_lun)); -#else - lun = (aep->at_cmnd.fcp_cmnd_lun[0] & 0x3f << 8) | - aep->at_cmnd.fcp_cmnd_lun[1]; -#endif /* * Find the N-port handle, and Virtual Port Index for this command. @@ -2375,9 +2359,6 @@ isp_handle_platform_notify_fc(ispsoftc_t if (ISP_CAP_SCCFW(isp)) { lun = inp->in_scclun; -#if __FreeBSD_version < 1000700 - lun &= 0x3fff; -#endif } else { lun = inp->in_lun; } @@ -3834,12 +3815,7 @@ isp_action(struct cam_sim *sim, union cc fcparam *fcp = FCPARAM(isp, bus); cpi->hba_misc = PIM_NOBUSRESET | PIM_UNMAPPED; -#if __FreeBSD_version >= 1000700 - cpi->hba_misc |= PIM_EXTLUNS; -#endif -#if __FreeBSD_version >= 1000039 - cpi->hba_misc |= PIM_NOSCAN; -#endif + cpi->hba_misc |= PIM_EXTLUNS | PIM_NOSCAN; /* * Because our loop ID can shift from time to time, Modified: stable/10/sys/dev/isp/isp_freebsd.h ============================================================================== --- stable/10/sys/dev/isp/isp_freebsd.h Sun Mar 26 08:52:14 2017 (r315977) +++ stable/10/sys/dev/isp/isp_freebsd.h Sun Mar 26 08:52:44 2017 (r315978) @@ -382,13 +382,8 @@ struct isposinfo { #define ISP_MEMCPY memcpy #define ISP_SNPRINTF snprintf #define ISP_DELAY(x) DELAY(x) -#if __FreeBSD_version < 1000029 -#define ISP_SLEEP(isp, x) msleep(&(isp)->isp_osinfo.is_exiting, \ - &(isp)->isp_osinfo.lock, 0, "isp_sleep", ((x) + tick - 1) / tick) -#else #define ISP_SLEEP(isp, x) msleep_sbt(&(isp)->isp_osinfo.is_exiting, \ &(isp)->isp_osinfo.lock, 0, "isp_sleep", (x) * SBT_1US, 0, 0) -#endif #define ISP_MIN imin Modified: stable/10/sys/dev/isp/isp_target.c ============================================================================== --- stable/10/sys/dev/isp/isp_target.c Sun Mar 26 08:52:14 2017 (r315977) +++ stable/10/sys/dev/isp/isp_target.c Sun Mar 26 08:52:44 2017 (r315978) @@ -726,9 +726,6 @@ isp_got_msg_fc(ispsoftc_t *isp, in_fcent /* nt_tgt set in outer layers */ if (ISP_CAP_SCCFW(isp)) { notify.nt_lun = inp->in_scclun; -#if __FreeBSD_version < 1000700 - notify.nt_lun &= 0x3fff; -#endif } else { notify.nt_lun = inp->in_lun; } @@ -1017,9 +1014,6 @@ isp_handle_atio2(ispsoftc_t *isp, at2_en if (ISP_CAP_SCCFW(isp)) { lun = aep->at_scclun; -#if __FreeBSD_version < 1000700 - lun &= 0x3fff; -#endif } else { lun = aep->at_lun; } From owner-svn-src-stable-10@freebsd.org Sun Mar 26 08:54:10 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6CAAED1E897; Sun, 26 Mar 2017 08:54:10 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2AD291E3A; Sun, 26 Mar 2017 08:54:10 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2Q8s9fG077323; Sun, 26 Mar 2017 08:54:09 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2Q8s8GD077320; Sun, 26 Mar 2017 08:54:08 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201703260854.v2Q8s8GD077320@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sun, 26 Mar 2017 08:54:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r315980 - stable/10/sys/dev/isp X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Mar 2017 08:54:10 -0000 Author: mav Date: Sun Mar 26 08:54:08 2017 New Revision: 315980 URL: https://svnweb.freebsd.org/changeset/base/315980 Log: MFC r315161: Try to slight untangle I/O and loop status handling. Modified: stable/10/sys/dev/isp/isp.c stable/10/sys/dev/isp/isp_freebsd.c stable/10/sys/dev/isp/isp_freebsd.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/isp/isp.c ============================================================================== --- stable/10/sys/dev/isp/isp.c Sun Mar 26 08:53:29 2017 (r315979) +++ stable/10/sys/dev/isp/isp.c Sun Mar 26 08:54:08 2017 (r315980) @@ -4343,13 +4343,6 @@ isp_start(XS_T *xs) return (CMD_COMPLETE); } - /* - * Try again later. - */ - if (fcp->isp_loopstate != LOOP_READY) { - return (CMD_RQLATER); - } - isp_prt(isp, ISP_LOGDEBUG2, "XS_TGT(xs)=%d", target); lp = &fcp->portdb[target]; if (target < 0 || target >= MAX_FC_TARG || @@ -4357,6 +4350,12 @@ isp_start(XS_T *xs) XS_SETERR(xs, HBA_SELTIMEOUT); return (CMD_COMPLETE); } + if (fcp->isp_loopstate != LOOP_READY) { + isp_prt(isp, ISP_LOGDEBUG1, + "%d.%d.%jx loop is not ready", + XS_CHANNEL(xs), target, (uintmax_t)XS_LUN(xs)); + return (CMD_RQLATER); + } if (lp->state == FC_PORTDB_STATE_ZOMBIE) { isp_prt(isp, ISP_LOGDEBUG1, "%d.%d.%jx target zombie", @@ -6544,7 +6543,8 @@ isp_parse_status(ispsoftc_t *isp, ispsta case RQCS_PORT_CHANGED: isp_prt(isp, ISP_LOGWARN, "port changed for target %d", XS_TGT(xs)); if (XS_NOERR(xs)) { - XS_SETERR(xs, HBA_SELTIMEOUT); + *XS_STSP(xs) = SCSI_BUSY; + XS_SETERR(xs, HBA_TGTBSY); } return; @@ -6693,11 +6693,11 @@ isp_parse_status_24xx(ispsoftc_t *isp, i case RQCS_PORT_CHANGED: isp_prt(isp, ISP_LOGWARN, "port changed for target %d chan %d", XS_TGT(xs), chan); if (XS_NOERR(xs)) { - XS_SETERR(xs, HBA_SELTIMEOUT); + *XS_STSP(xs) = SCSI_BUSY; + XS_SETERR(xs, HBA_TGTBSY); } return; - case RQCS_24XX_ENOMEM: /* f/w resource unavailable */ isp_prt(isp, ISP_LOGWARN, "f/w resource unavailable for target %d chan %d", XS_TGT(xs), chan); if (XS_NOERR(xs)) { Modified: stable/10/sys/dev/isp/isp_freebsd.c ============================================================================== --- stable/10/sys/dev/isp/isp_freebsd.c Sun Mar 26 08:53:29 2017 (r315979) +++ stable/10/sys/dev/isp/isp_freebsd.c Sun Mar 26 08:54:08 2017 (r315980) @@ -3029,7 +3029,6 @@ isp_loop_changed(ispsoftc_t *isp, int ch isp_prt(isp, ISP_LOG_SANCFG|ISP_LOGDEBUG0, "Chan %d Loop changed", chan); if (fcp->role & ISP_ROLE_INITIATOR) isp_freeze_loopdown(isp, chan); - fc->loop_dead = 0; fc->loop_down_time = time_uptime; wakeup(fc); } @@ -3041,7 +3040,6 @@ isp_loop_up(ispsoftc_t *isp, int chan) isp_prt(isp, ISP_LOG_SANCFG|ISP_LOGDEBUG0, "Chan %d Loop is up", chan); fc->loop_seen_once = 1; - fc->loop_dead = 0; fc->loop_down_time = 0; isp_unfreeze_loopdown(isp, chan); } @@ -3105,7 +3103,6 @@ isp_loop_dead(ispsoftc_t *isp, int chan) } isp_unfreeze_loopdown(isp, chan); - fc->loop_dead = 1; fc->loop_down_time = 0; } @@ -3333,18 +3330,6 @@ isp_action(struct cam_sim *sim, union cc callout_reset(&PISP_PCMD(ccb)->wdog, ts, isp_watchdog, ccb); break; case CMD_RQLATER: - /* - * We get this result if the loop isn't ready - * or if the device in question has gone zombie. - */ - if (ISP_FC_PC(isp, bus)->loop_dead) { - isp_prt(isp, ISP_LOGDEBUG0, - "%d.%jx loop is dead", - XS_TGT(ccb), (uintmax_t)XS_LUN(ccb)); - ccb->ccb_h.status = CAM_SEL_TIMEOUT; - isp_done((struct ccb_scsiio *) ccb); - break; - } isp_prt(isp, ISP_LOGDEBUG0, "%d.%jx retry later", XS_TGT(ccb), (uintmax_t)XS_LUN(ccb)); cam_freeze_devq(ccb->ccb_h.path); @@ -3868,8 +3853,6 @@ isp_action(struct cam_sim *sim, union cc } } -#define ISPDDB (CAM_DEBUG_INFO|CAM_DEBUG_TRACE|CAM_DEBUG_CDB) - void isp_done(XS_T *sccb) { @@ -3890,27 +3873,10 @@ isp_done(XS_T *sccb) sccb->ccb_h.status &= ~CAM_SIM_QUEUED; status = sccb->ccb_h.status & CAM_STATUS_MASK; - if (status != CAM_REQ_CMP) { - if (status != CAM_SEL_TIMEOUT) - isp_prt(isp, ISP_LOGDEBUG0, - "target %d lun %jx CAM status 0x%x SCSI status 0x%x", - XS_TGT(sccb), (uintmax_t)XS_LUN(sccb), - sccb->ccb_h.status, sccb->scsi_status); - else if ((IS_FC(isp)) - && (XS_TGT(sccb) < MAX_FC_TARG)) { - fcparam *fcp; - - fcp = FCPARAM(isp, XS_CHANNEL(sccb)); - fcp->portdb[XS_TGT(sccb)].is_target = 0; - } - if ((sccb->ccb_h.status & CAM_DEV_QFRZN) == 0) { - sccb->ccb_h.status |= CAM_DEV_QFRZN; - xpt_freeze_devq(sccb->ccb_h.path, 1); - } - } - - if ((CAM_DEBUGGED(sccb->ccb_h.path, ISPDDB)) && (sccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) { - xpt_print(sccb->ccb_h.path, "cam completion status 0x%x\n", sccb->ccb_h.status); + if (status != CAM_REQ_CMP && + (sccb->ccb_h.status & CAM_DEV_QFRZN) == 0) { + sccb->ccb_h.status |= CAM_DEV_QFRZN; + xpt_freeze_devq(sccb->ccb_h.path, 1); } if (ISP_PCMD(sccb)) { Modified: stable/10/sys/dev/isp/isp_freebsd.h ============================================================================== --- stable/10/sys/dev/isp/isp_freebsd.h Sun Mar 26 08:53:29 2017 (r315979) +++ stable/10/sys/dev/isp/isp_freebsd.h Sun Mar 26 08:54:08 2017 (r315980) @@ -225,8 +225,6 @@ struct isp_fc { simqfrozen : 3, default_id : 8, def_role : 2, /* default role */ - gdt_running : 1, - loop_dead : 1, loop_seen_once : 1, fcbsy : 1, ready : 1; From owner-svn-src-stable-10@freebsd.org Sun Mar 26 18:12:52 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 429EED1EDEF; Sun, 26 Mar 2017 18:12:52 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0F5791367; Sun, 26 Mar 2017 18:12:51 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2QICpED009279; Sun, 26 Mar 2017 18:12:51 GMT (envelope-from kp@FreeBSD.org) Received: (from kp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2QICp8k009278; Sun, 26 Mar 2017 18:12:51 GMT (envelope-from kp@FreeBSD.org) Message-Id: <201703261812.v2QICp8k009278@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kp set sender to kp@FreeBSD.org using -f From: Kristof Provost Date: Sun, 26 Mar 2017 18:12:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r316000 - stable/10/sys/netpfil/pf X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Mar 2017 18:12:52 -0000 Author: kp Date: Sun Mar 26 18:12:50 2017 New Revision: 316000 URL: https://svnweb.freebsd.org/changeset/base/316000 Log: MFC 315529 pf: Fix rule evaluation after inet6 route-to In pf_route6() we re-run the ruleset with PF_FWD if the packet goes out of a different interface. pf_test6() needs to know that the packet was forwarded (in case it needs to refragment so it knows whether to call ip6_output() or ip6_forward()). This lead pf_test6() to try to evaluate rules against the PF_FWD direction, which isn't supported, so it needs to treat PF_FWD as PF_OUT. Once fwdir is set correctly the correct output/forward function will be called. PR: 217883 Submitted by: Kajetan Staszkiewicz Sponsored by: InnoGames GmbH Modified: stable/10/sys/netpfil/pf/pf.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netpfil/pf/pf.c ============================================================================== --- stable/10/sys/netpfil/pf/pf.c Sun Mar 26 18:11:40 2017 (r315999) +++ stable/10/sys/netpfil/pf/pf.c Sun Mar 26 18:12:50 2017 (r316000) @@ -6165,6 +6165,9 @@ pf_test6(int dir, struct ifnet *ifp, str m->m_pkthdr.rcvif->if_bridge != ifp->if_bridge))) fwdir = PF_FWD; + if (dir == PF_FWD) + dir = PF_OUT; + if (!V_pf_status.running) return (PF_PASS); From owner-svn-src-stable-10@freebsd.org Mon Mar 27 08:29:48 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 42633D1E180; Mon, 27 Mar 2017 08:29:48 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0F1401047; Mon, 27 Mar 2017 08:29:47 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2R8Tl95068487; Mon, 27 Mar 2017 08:29:47 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2R8TlQU068486; Mon, 27 Mar 2017 08:29:47 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201703270829.v2R8TlQU068486@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 27 Mar 2017 08:29:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r316016 - stable/10/sys/dev/isp X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Mar 2017 08:29:48 -0000 Author: mav Date: Mon Mar 27 08:29:46 2017 New Revision: 316016 URL: https://svnweb.freebsd.org/changeset/base/316016 Log: MFC 315229: Remove remnant of r315163. Modified: stable/10/sys/dev/isp/isp_freebsd.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/isp/isp_freebsd.c ============================================================================== --- stable/10/sys/dev/isp/isp_freebsd.c Mon Mar 27 08:29:17 2017 (r316015) +++ stable/10/sys/dev/isp/isp_freebsd.c Mon Mar 27 08:29:46 2017 (r316016) @@ -52,7 +52,6 @@ static const char prom3[] = "Chan %d [%u static void isp_freeze_loopdown(ispsoftc_t *, int); static void isp_loop_changed(ispsoftc_t *isp, int chan); static d_ioctl_t ispioctl; -static void isp_intr_enable(void *); static void isp_cam_async(void *, uint32_t, struct cam_path *, void *); static void isp_poll(struct cam_sim *); static timeout_t isp_watchdog; From owner-svn-src-stable-10@freebsd.org Mon Mar 27 18:23:47 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 44DF0D20E3B; Mon, 27 Mar 2017 18:23:47 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 14060AB; Mon, 27 Mar 2017 18:23:47 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2RINkls018259; Mon, 27 Mar 2017 18:23:46 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2RINkun018257; Mon, 27 Mar 2017 18:23:46 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201703271823.v2RINkun018257@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Mon, 27 Mar 2017 18:23:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r316040 - stable/10/lib/libkvm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Mar 2017 18:23:47 -0000 Author: ngie Date: Mon Mar 27 18:23:45 2017 New Revision: 316040 URL: https://svnweb.freebsd.org/changeset/base/316040 Log: MFC r315595,r315603: r315595: Remove a commented out line before kvm_getprocs(3) The commented out return value for kvm_getprocs(3) was misleading -- the uncommented line is correct. No content change r315603: kvm_close(3): return `error` instead of blindly returning `0` `error` is the accumulated error from previous close(2) calls. This bug has been present since the libcall's import from 4.4BSD Lite (r1573). Noticed by: vangyzen (D10022) Relnotes: yes Modified: stable/10/lib/libkvm/kvm.c stable/10/lib/libkvm/kvm_getprocs.3 Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libkvm/kvm.c ============================================================================== --- stable/10/lib/libkvm/kvm.c Mon Mar 27 18:22:33 2017 (r316039) +++ stable/10/lib/libkvm/kvm.c Mon Mar 27 18:23:45 2017 (r316040) @@ -280,7 +280,7 @@ kvm_close(kvm_t *kd) free((void *)kd->argv); free((void *)kd); - return (0); + return (error); } /* Modified: stable/10/lib/libkvm/kvm_getprocs.3 ============================================================================== --- stable/10/lib/libkvm/kvm_getprocs.3 Mon Mar 27 18:22:33 2017 (r316039) +++ stable/10/lib/libkvm/kvm_getprocs.3 Mon Mar 27 18:23:45 2017 (r316040) @@ -47,7 +47,6 @@ .In sys/param.h .In sys/sysctl.h .In sys/user.h -.\" .Fa kvm_t *kd .Ft struct kinfo_proc * .Fn kvm_getprocs "kvm_t *kd" "int op" "int arg" "int *cnt" .Ft char ** From owner-svn-src-stable-10@freebsd.org Mon Mar 27 18:24:29 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3CB60D20F23; Mon, 27 Mar 2017 18:24:29 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 03867281; Mon, 27 Mar 2017 18:24:28 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2RIOSpQ018392; Mon, 27 Mar 2017 18:24:28 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2RIOSkS018391; Mon, 27 Mar 2017 18:24:28 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201703271824.v2RIOSkS018391@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Mon, 27 Mar 2017 18:24:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r316042 - stable/10/sbin/route X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Mar 2017 18:24:29 -0000 Author: ngie Date: Mon Mar 27 18:24:27 2017 New Revision: 316042 URL: https://svnweb.freebsd.org/changeset/base/316042 Log: MFC r315690: Delete trailing whitespace (no functional change) Modified: stable/10/sbin/route/route.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/route/route.c ============================================================================== --- stable/10/sbin/route/route.c Mon Mar 27 18:24:17 2017 (r316041) +++ stable/10/sbin/route/route.c Mon Mar 27 18:24:27 2017 (r316042) @@ -269,7 +269,7 @@ fiboptlist_range(const char *arg, struct if (errno == 0) { if (*endptr != '\0' || fib[i] < 0 || - (numfibs != -1 && fib[i] > numfibs - 1)) + (numfibs != -1 && fib[i] > numfibs - 1)) errno = EINVAL; } if (errno) @@ -1127,7 +1127,7 @@ inet_makenetandmask(u_long net, struct s j <<= 8; } /* i holds the first non zero bit */ - bits = 32 - (i*8); + bits = 32 - (i*8); } if (bits != 0) mask = 0xffffffff << (32 - bits); @@ -1365,7 +1365,7 @@ prefixlen(const char *str) int max; char *p; - rtm_addrs |= RTA_NETMASK; + rtm_addrs |= RTA_NETMASK; switch (af) { #ifdef INET6 case AF_INET6: @@ -1399,7 +1399,7 @@ prefixlen(const char *str) if (len < 0 || max < len) errx(EX_USAGE, "%s: invalid prefixlen", str); - + q = len >> 3; r = len & 7; memset((void *)p, 0, max / 8); From owner-svn-src-stable-10@freebsd.org Mon Mar 27 18:26:24 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4F829D200CD; Mon, 27 Mar 2017 18:26:24 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1C01B7C1; Mon, 27 Mar 2017 18:26:24 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2RIQNTk018625; Mon, 27 Mar 2017 18:26:23 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2RIQNOT018624; Mon, 27 Mar 2017 18:26:23 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201703271826.v2RIQNOT018624@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Mon, 27 Mar 2017 18:26:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r316044 - stable/10/contrib/bsnmp/lib X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Mar 2017 18:26:24 -0000 Author: ngie Date: Mon Mar 27 18:26:22 2017 New Revision: 316044 URL: https://svnweb.freebsd.org/changeset/base/316044 Log: MFC r315641,r315642: r315641: bsnmp: don't leak snmp_client.fd in open_client_udp(..) on connect(2) failure r315642: bsnmp: explicitly test the return value for open_client_{local,udp} in snmp_open(..) open_client_* returns -1 on failure; 0 on success. Ensure that the return value is 0 -- otherwise exit snmp_open(..). Modified: stable/10/contrib/bsnmp/lib/snmpclient.c Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/bsnmp/lib/snmpclient.c ============================================================================== --- stable/10/contrib/bsnmp/lib/snmpclient.c Mon Mar 27 18:26:19 2017 (r316043) +++ stable/10/contrib/bsnmp/lib/snmpclient.c Mon Mar 27 18:26:22 2017 (r316044) @@ -947,6 +947,8 @@ open_client_udp(const char *host, const if ((res = res->ai_next) == NULL) { seterr(&snmp_client, "%s", strerror(errno)); freeaddrinfo(res0); + (void)close(snmp_client.fd); + snmp_client.fd = -1; return (-1); } } else @@ -1066,13 +1068,13 @@ snmp_open(const char *host, const char * switch (snmp_client.trans) { case SNMP_TRANS_UDP: - if (open_client_udp(host, port)) + if (open_client_udp(host, port) != 0) return (-1); break; case SNMP_TRANS_LOC_DGRAM: case SNMP_TRANS_LOC_STREAM: - if (open_client_local(host)) + if (open_client_local(host) != 0) return (-1); break; From owner-svn-src-stable-10@freebsd.org Mon Mar 27 18:28:18 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 747B3D201FE; Mon, 27 Mar 2017 18:28:18 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 43DBEB6E; Mon, 27 Mar 2017 18:28:18 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2RISHXp019166; Mon, 27 Mar 2017 18:28:17 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2RISHhQ019165; Mon, 27 Mar 2017 18:28:17 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201703271828.v2RISHhQ019165@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Mon, 27 Mar 2017 18:28:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r316046 - stable/10/tools/build/mk X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Mar 2017 18:28:18 -0000 Author: ngie Date: Mon Mar 27 18:28:17 2017 New Revision: 316046 URL: https://svnweb.freebsd.org/changeset/base/316046 Log: MFC r314245: Fill MK_LIBTHR as far as lib/libthr is concerned There are other areas of the tree that will need to be evaluated for sanity if they're supposed to be conditionally compiled out of the build/install, like libzpool Relnotes: yes (this might break someone's system if have the knob set) Modified: stable/10/tools/build/mk/OptionalObsoleteFiles.inc Directory Properties: stable/10/ (props changed) Modified: stable/10/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- stable/10/tools/build/mk/OptionalObsoleteFiles.inc Mon Mar 27 18:28:15 2017 (r316045) +++ stable/10/tools/build/mk/OptionalObsoleteFiles.inc Mon Mar 27 18:28:17 2017 (r316046) @@ -3783,9 +3783,12 @@ OLD_DIRS+=usr/include/c++/v1/ext OLD_DIRS+=usr/include/c++/v1 .endif -#.if ${MK_LIBTHR} == no -# to be filled in -#.endif +.if ${MK_LIBTHR} == no +OLD_LIBS+=lib/libthr.so.3 +OLD_FILES+=usr/lib/libthr.a +OLD_FILES+=usr/lib/libthr_p.a +OLD_FILES+=usr/share/man/man3/libthr.3.gz +.endif .if ${MK_LLDB} == no OLD_FILES+=usr/bin/lldb From owner-svn-src-stable-10@freebsd.org Mon Mar 27 18:29:31 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A8CFFD20346; Mon, 27 Mar 2017 18:29:31 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 75695EFE; Mon, 27 Mar 2017 18:29:31 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2RITUrm019411; Mon, 27 Mar 2017 18:29:30 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2RITUjp019410; Mon, 27 Mar 2017 18:29:30 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201703271829.v2RITUjp019410@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Mon, 27 Mar 2017 18:29:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r316047 - stable/10/lib/libcam X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Mar 2017 18:29:31 -0000 Author: ngie Date: Mon Mar 27 18:29:30 2017 New Revision: 316047 URL: https://svnweb.freebsd.org/changeset/base/316047 Log: MFC r315639: libcam: NULL out freed `ccb.cdm.matches` and `ccb.cdm.patterns` pointers This is being done to avoid potential double frees with the values. Modified: stable/10/lib/libcam/camlib.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libcam/camlib.c ============================================================================== --- stable/10/lib/libcam/camlib.c Mon Mar 27 18:28:17 2017 (r316046) +++ stable/10/lib/libcam/camlib.c Mon Mar 27 18:29:30 2017 (r316047) @@ -308,6 +308,7 @@ cam_open_btl(path_id_t path_id, target_i snprintf(cam_errbuf, CAM_ERRBUF_SIZE, "%s: couldn't malloc pattern buffer", func_name); free(ccb.cdm.matches); + ccb.cdm.matches = NULL; close(fd); return(NULL); } @@ -371,7 +372,9 @@ cam_open_btl(path_id_t path_id, target_i periph_result = &ccb.cdm.matches[0].result.periph_result; pass_unit = periph_result->unit_number; free(ccb.cdm.matches); + ccb.cdm.matches = NULL; free(ccb.cdm.patterns); + ccb.cdm.patterns = NULL; close(fd); sprintf(dev_path, "/dev/pass%d", pass_unit); return(cam_real_open_device(dev_path, flags, device, NULL, @@ -388,7 +391,9 @@ cam_open_btl(path_id_t path_id, target_i btl_bailout: free(ccb.cdm.matches); + ccb.cdm.matches = NULL; free(ccb.cdm.patterns); + ccb.cdm.patterns = NULL; close(fd); return(NULL); } From owner-svn-src-stable-10@freebsd.org Tue Mar 28 04:48:57 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 84C2AD219FE; Tue, 28 Mar 2017 04:48:57 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3608A63A; Tue, 28 Mar 2017 04:48:57 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2S4muDp074345; Tue, 28 Mar 2017 04:48:56 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2S4mu6S074341; Tue, 28 Mar 2017 04:48:56 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201703280448.v2S4mu6S074341@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Tue, 28 Mar 2017 04:48:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r316069 - in stable/10: contrib/ntp contrib/ntp/adjtimed contrib/ntp/clockstuff contrib/ntp/html contrib/ntp/include contrib/ntp/include/isc contrib/ntp/kernel contrib/ntp/kernel/sys co... X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Mar 2017 04:48:57 -0000 Author: delphij Date: Tue Mar 28 04:48:55 2017 New Revision: 316069 URL: https://svnweb.freebsd.org/changeset/base/316069 Log: MFC r315871: MFV r315791: ntp 4.2.8p10. Added: stable/10/contrib/ntp/sntp/harden/ - copied from r315871, head/contrib/ntp/sntp/harden/ stable/10/contrib/ntp/sntp/m4/ntp_harden.m4 - copied unchanged from r315871, head/contrib/ntp/sntp/m4/ntp_harden.m4 stable/10/contrib/ntp/sntp/scripts/genHardFlags - copied unchanged from r315871, head/contrib/ntp/sntp/scripts/genHardFlags Deleted: stable/10/contrib/ntp/compile stable/10/contrib/ntp/config.guess stable/10/contrib/ntp/config.sub stable/10/contrib/ntp/depcomp stable/10/contrib/ntp/install-sh stable/10/contrib/ntp/ltmain.sh stable/10/contrib/ntp/missing stable/10/contrib/ntp/sntp/compile stable/10/contrib/ntp/sntp/config.guess stable/10/contrib/ntp/sntp/config.sub stable/10/contrib/ntp/sntp/depcomp stable/10/contrib/ntp/sntp/install-sh stable/10/contrib/ntp/sntp/ltmain.sh stable/10/contrib/ntp/sntp/missing stable/10/contrib/ntp/tests/ stable/10/contrib/ntp/ylwrap Modified: stable/10/contrib/ntp/COPYRIGHT stable/10/contrib/ntp/ChangeLog stable/10/contrib/ntp/CommitLog stable/10/contrib/ntp/Makefile.in stable/10/contrib/ntp/NEWS stable/10/contrib/ntp/aclocal.m4 stable/10/contrib/ntp/adjtimed/Makefile.am stable/10/contrib/ntp/adjtimed/Makefile.in stable/10/contrib/ntp/clockstuff/Makefile.am stable/10/contrib/ntp/clockstuff/Makefile.in stable/10/contrib/ntp/config.h.in stable/10/contrib/ntp/configure stable/10/contrib/ntp/configure.ac stable/10/contrib/ntp/html/copyright.html stable/10/contrib/ntp/include/Makefile.in stable/10/contrib/ntp/include/isc/Makefile.in stable/10/contrib/ntp/include/libssl_compat.h stable/10/contrib/ntp/include/ntp_crypto.h stable/10/contrib/ntp/include/ntp_fp.h stable/10/contrib/ntp/include/ntp_md5.h stable/10/contrib/ntp/include/ntp_stdlib.h stable/10/contrib/ntp/include/ntpd.h stable/10/contrib/ntp/include/ssl_applink.c stable/10/contrib/ntp/kernel/Makefile.in stable/10/contrib/ntp/kernel/sys/Makefile.in stable/10/contrib/ntp/lib/isc/inet_pton.c stable/10/contrib/ntp/libntp/Makefile.am stable/10/contrib/ntp/libntp/Makefile.in stable/10/contrib/ntp/libntp/a_md5encrypt.c stable/10/contrib/ntp/libntp/audio.c stable/10/contrib/ntp/libntp/authkeys.c stable/10/contrib/ntp/libntp/emalloc.c stable/10/contrib/ntp/libntp/libssl_compat.c stable/10/contrib/ntp/libntp/ntp_intres.c stable/10/contrib/ntp/libntp/recvbuff.c stable/10/contrib/ntp/libntp/ssl_init.c stable/10/contrib/ntp/libntp/statestr.c stable/10/contrib/ntp/libntp/work_fork.c stable/10/contrib/ntp/libparse/Makefile.am stable/10/contrib/ntp/libparse/Makefile.in stable/10/contrib/ntp/libparse/clk_trimtsip.c stable/10/contrib/ntp/libparse/gpstolfp.c stable/10/contrib/ntp/ntpd/Makefile.am stable/10/contrib/ntp/ntpd/Makefile.in stable/10/contrib/ntp/ntpd/invoke-ntp.conf.texi stable/10/contrib/ntp/ntpd/invoke-ntp.keys.texi stable/10/contrib/ntp/ntpd/invoke-ntpd.texi stable/10/contrib/ntp/ntpd/ntp.conf.5man stable/10/contrib/ntp/ntpd/ntp.conf.5mdoc stable/10/contrib/ntp/ntpd/ntp.conf.html stable/10/contrib/ntp/ntpd/ntp.conf.man.in stable/10/contrib/ntp/ntpd/ntp.conf.mdoc.in stable/10/contrib/ntp/ntpd/ntp.keys.5man stable/10/contrib/ntp/ntpd/ntp.keys.5mdoc stable/10/contrib/ntp/ntpd/ntp.keys.html stable/10/contrib/ntp/ntpd/ntp.keys.man.in stable/10/contrib/ntp/ntpd/ntp.keys.mdoc.in stable/10/contrib/ntp/ntpd/ntp_config.c stable/10/contrib/ntp/ntpd/ntp_control.c stable/10/contrib/ntp/ntpd/ntp_crypto.c stable/10/contrib/ntp/ntpd/ntp_io.c stable/10/contrib/ntp/ntpd/ntp_loopfilter.c stable/10/contrib/ntp/ntpd/ntp_parser.c stable/10/contrib/ntp/ntpd/ntp_parser.h stable/10/contrib/ntp/ntpd/ntp_peer.c stable/10/contrib/ntp/ntpd/ntp_proto.c stable/10/contrib/ntp/ntpd/ntp_restrict.c stable/10/contrib/ntp/ntpd/ntp_scanner.c stable/10/contrib/ntp/ntpd/ntpd-opts.c stable/10/contrib/ntp/ntpd/ntpd-opts.h stable/10/contrib/ntp/ntpd/ntpd.1ntpdman stable/10/contrib/ntp/ntpd/ntpd.1ntpdmdoc stable/10/contrib/ntp/ntpd/ntpd.c stable/10/contrib/ntp/ntpd/ntpd.html stable/10/contrib/ntp/ntpd/ntpd.man.in stable/10/contrib/ntp/ntpd/ntpd.mdoc.in stable/10/contrib/ntp/ntpd/refclock_datum.c stable/10/contrib/ntp/ntpd/refclock_gpsdjson.c stable/10/contrib/ntp/ntpd/refclock_jjy.c stable/10/contrib/ntp/ntpd/refclock_mx4200.c stable/10/contrib/ntp/ntpd/refclock_nmea.c stable/10/contrib/ntp/ntpd/refclock_oncore.c stable/10/contrib/ntp/ntpd/refclock_parse.c stable/10/contrib/ntp/ntpdate/Makefile.am stable/10/contrib/ntp/ntpdate/Makefile.in stable/10/contrib/ntp/ntpdate/ntpdate.c stable/10/contrib/ntp/ntpdc/Makefile.am stable/10/contrib/ntp/ntpdc/Makefile.in stable/10/contrib/ntp/ntpdc/invoke-ntpdc.texi stable/10/contrib/ntp/ntpdc/ntpdc-opts.c stable/10/contrib/ntp/ntpdc/ntpdc-opts.h stable/10/contrib/ntp/ntpdc/ntpdc.1ntpdcman stable/10/contrib/ntp/ntpdc/ntpdc.1ntpdcmdoc stable/10/contrib/ntp/ntpdc/ntpdc.c stable/10/contrib/ntp/ntpdc/ntpdc.html stable/10/contrib/ntp/ntpdc/ntpdc.man.in stable/10/contrib/ntp/ntpdc/ntpdc.mdoc.in stable/10/contrib/ntp/ntpdc/ntpdc_ops.c stable/10/contrib/ntp/ntpq/Makefile.am stable/10/contrib/ntp/ntpq/Makefile.in stable/10/contrib/ntp/ntpq/invoke-ntpq.texi stable/10/contrib/ntp/ntpq/libntpq.c stable/10/contrib/ntp/ntpq/ntpq-opts.c stable/10/contrib/ntp/ntpq/ntpq-opts.h stable/10/contrib/ntp/ntpq/ntpq-subs.c stable/10/contrib/ntp/ntpq/ntpq.1ntpqman stable/10/contrib/ntp/ntpq/ntpq.1ntpqmdoc stable/10/contrib/ntp/ntpq/ntpq.c stable/10/contrib/ntp/ntpq/ntpq.html stable/10/contrib/ntp/ntpq/ntpq.man.in stable/10/contrib/ntp/ntpq/ntpq.mdoc.in stable/10/contrib/ntp/ntpsnmpd/Makefile.am stable/10/contrib/ntp/ntpsnmpd/Makefile.in stable/10/contrib/ntp/ntpsnmpd/invoke-ntpsnmpd.texi stable/10/contrib/ntp/ntpsnmpd/ntpsnmpd-opts.c stable/10/contrib/ntp/ntpsnmpd/ntpsnmpd-opts.h stable/10/contrib/ntp/ntpsnmpd/ntpsnmpd.1ntpsnmpdman stable/10/contrib/ntp/ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc stable/10/contrib/ntp/ntpsnmpd/ntpsnmpd.html stable/10/contrib/ntp/ntpsnmpd/ntpsnmpd.man.in stable/10/contrib/ntp/ntpsnmpd/ntpsnmpd.mdoc.in stable/10/contrib/ntp/packageinfo.sh stable/10/contrib/ntp/parseutil/Makefile.am stable/10/contrib/ntp/parseutil/Makefile.in stable/10/contrib/ntp/scripts/Makefile.in stable/10/contrib/ntp/scripts/build/Makefile.in stable/10/contrib/ntp/scripts/calc_tickadj/Makefile.in stable/10/contrib/ntp/scripts/calc_tickadj/calc_tickadj.1calc_tickadjman stable/10/contrib/ntp/scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc stable/10/contrib/ntp/scripts/calc_tickadj/calc_tickadj.html stable/10/contrib/ntp/scripts/calc_tickadj/calc_tickadj.man.in stable/10/contrib/ntp/scripts/calc_tickadj/calc_tickadj.mdoc.in stable/10/contrib/ntp/scripts/calc_tickadj/invoke-calc_tickadj.texi stable/10/contrib/ntp/scripts/invoke-plot_summary.texi stable/10/contrib/ntp/scripts/invoke-summary.texi stable/10/contrib/ntp/scripts/lib/Makefile.in stable/10/contrib/ntp/scripts/ntp-wait/Makefile.in stable/10/contrib/ntp/scripts/ntp-wait/invoke-ntp-wait.texi stable/10/contrib/ntp/scripts/ntp-wait/ntp-wait-opts stable/10/contrib/ntp/scripts/ntp-wait/ntp-wait.1ntp-waitman stable/10/contrib/ntp/scripts/ntp-wait/ntp-wait.1ntp-waitmdoc stable/10/contrib/ntp/scripts/ntp-wait/ntp-wait.html stable/10/contrib/ntp/scripts/ntp-wait/ntp-wait.man.in stable/10/contrib/ntp/scripts/ntp-wait/ntp-wait.mdoc.in stable/10/contrib/ntp/scripts/ntpsweep/Makefile.in stable/10/contrib/ntp/scripts/ntpsweep/invoke-ntpsweep.texi stable/10/contrib/ntp/scripts/ntpsweep/ntpsweep-opts stable/10/contrib/ntp/scripts/ntpsweep/ntpsweep.1ntpsweepman stable/10/contrib/ntp/scripts/ntpsweep/ntpsweep.1ntpsweepmdoc stable/10/contrib/ntp/scripts/ntpsweep/ntpsweep.html stable/10/contrib/ntp/scripts/ntpsweep/ntpsweep.man.in stable/10/contrib/ntp/scripts/ntpsweep/ntpsweep.mdoc.in stable/10/contrib/ntp/scripts/ntptrace/Makefile.in stable/10/contrib/ntp/scripts/ntptrace/invoke-ntptrace.texi stable/10/contrib/ntp/scripts/ntptrace/ntptrace-opts stable/10/contrib/ntp/scripts/ntptrace/ntptrace.1ntptraceman stable/10/contrib/ntp/scripts/ntptrace/ntptrace.1ntptracemdoc stable/10/contrib/ntp/scripts/ntptrace/ntptrace.html stable/10/contrib/ntp/scripts/ntptrace/ntptrace.man.in stable/10/contrib/ntp/scripts/ntptrace/ntptrace.mdoc.in stable/10/contrib/ntp/scripts/plot_summary-opts stable/10/contrib/ntp/scripts/plot_summary.1plot_summaryman stable/10/contrib/ntp/scripts/plot_summary.1plot_summarymdoc stable/10/contrib/ntp/scripts/plot_summary.html stable/10/contrib/ntp/scripts/plot_summary.man.in stable/10/contrib/ntp/scripts/plot_summary.mdoc.in stable/10/contrib/ntp/scripts/summary-opts stable/10/contrib/ntp/scripts/summary.1summaryman stable/10/contrib/ntp/scripts/summary.1summarymdoc stable/10/contrib/ntp/scripts/summary.html stable/10/contrib/ntp/scripts/summary.man.in stable/10/contrib/ntp/scripts/summary.mdoc.in stable/10/contrib/ntp/scripts/update-leap/Makefile.in stable/10/contrib/ntp/scripts/update-leap/invoke-update-leap.texi stable/10/contrib/ntp/scripts/update-leap/update-leap-opts stable/10/contrib/ntp/scripts/update-leap/update-leap.1update-leapman stable/10/contrib/ntp/scripts/update-leap/update-leap.1update-leapmdoc stable/10/contrib/ntp/scripts/update-leap/update-leap.html stable/10/contrib/ntp/scripts/update-leap/update-leap.man.in stable/10/contrib/ntp/scripts/update-leap/update-leap.mdoc.in stable/10/contrib/ntp/sntp/COPYRIGHT stable/10/contrib/ntp/sntp/Makefile.am stable/10/contrib/ntp/sntp/Makefile.in stable/10/contrib/ntp/sntp/aclocal.m4 stable/10/contrib/ntp/sntp/config.h.in stable/10/contrib/ntp/sntp/configure stable/10/contrib/ntp/sntp/configure.ac stable/10/contrib/ntp/sntp/crypto.c stable/10/contrib/ntp/sntp/include/Makefile.in stable/10/contrib/ntp/sntp/include/copyright.def stable/10/contrib/ntp/sntp/include/version.def stable/10/contrib/ntp/sntp/include/version.texi stable/10/contrib/ntp/sntp/invoke-sntp.texi stable/10/contrib/ntp/sntp/kod_management.c stable/10/contrib/ntp/sntp/libevent/Makefile.am stable/10/contrib/ntp/sntp/libevent/Makefile.in stable/10/contrib/ntp/sntp/libevent/build-aux/compile stable/10/contrib/ntp/sntp/libevent/build-aux/config.guess stable/10/contrib/ntp/sntp/libevent/build-aux/config.sub stable/10/contrib/ntp/sntp/libevent/build-aux/depcomp stable/10/contrib/ntp/sntp/libevent/build-aux/install-sh stable/10/contrib/ntp/sntp/libevent/build-aux/ltmain.sh stable/10/contrib/ntp/sntp/libevent/build-aux/missing stable/10/contrib/ntp/sntp/libevent/build-aux/ylwrap stable/10/contrib/ntp/sntp/libevent/config.h.in stable/10/contrib/ntp/sntp/libevent/configure stable/10/contrib/ntp/sntp/libevent/configure.ac stable/10/contrib/ntp/sntp/libevent/m4/libtool.m4 stable/10/contrib/ntp/sntp/libevent/m4/ltoptions.m4 stable/10/contrib/ntp/sntp/libevent/m4/ltsugar.m4 stable/10/contrib/ntp/sntp/libevent/m4/ltversion.m4 stable/10/contrib/ntp/sntp/libevent/m4/lt~obsolete.m4 stable/10/contrib/ntp/sntp/libevent/test/regress_ssl.c stable/10/contrib/ntp/sntp/libopts/Makefile.am stable/10/contrib/ntp/sntp/libopts/Makefile.in stable/10/contrib/ntp/sntp/m4/libtool.m4 stable/10/contrib/ntp/sntp/m4/ltoptions.m4 stable/10/contrib/ntp/sntp/m4/ltsugar.m4 stable/10/contrib/ntp/sntp/m4/ltversion.m4 stable/10/contrib/ntp/sntp/m4/lt~obsolete.m4 stable/10/contrib/ntp/sntp/m4/ntp_compiler.m4 stable/10/contrib/ntp/sntp/m4/ntp_libevent.m4 stable/10/contrib/ntp/sntp/m4/ntp_libntp.m4 stable/10/contrib/ntp/sntp/m4/ntp_openssl.m4 stable/10/contrib/ntp/sntp/m4/ntp_prog_cc.m4 stable/10/contrib/ntp/sntp/m4/version.m4 stable/10/contrib/ntp/sntp/scm-rev stable/10/contrib/ntp/sntp/scripts/Makefile.am stable/10/contrib/ntp/sntp/scripts/Makefile.in stable/10/contrib/ntp/sntp/sntp-opts.c stable/10/contrib/ntp/sntp/sntp-opts.h stable/10/contrib/ntp/sntp/sntp.1sntpman stable/10/contrib/ntp/sntp/sntp.1sntpmdoc stable/10/contrib/ntp/sntp/sntp.html stable/10/contrib/ntp/sntp/sntp.man.in stable/10/contrib/ntp/sntp/sntp.mdoc.in stable/10/contrib/ntp/sntp/tests/Makefile.am stable/10/contrib/ntp/sntp/tests/Makefile.in stable/10/contrib/ntp/sntp/unity/Makefile.am stable/10/contrib/ntp/sntp/unity/Makefile.in stable/10/contrib/ntp/sntp/version.c stable/10/contrib/ntp/util/Makefile.am stable/10/contrib/ntp/util/Makefile.in stable/10/contrib/ntp/util/invoke-ntp-keygen.texi stable/10/contrib/ntp/util/ntp-keygen-opts.c stable/10/contrib/ntp/util/ntp-keygen-opts.h stable/10/contrib/ntp/util/ntp-keygen.1ntp-keygenman stable/10/contrib/ntp/util/ntp-keygen.1ntp-keygenmdoc stable/10/contrib/ntp/util/ntp-keygen.c stable/10/contrib/ntp/util/ntp-keygen.html stable/10/contrib/ntp/util/ntp-keygen.man.in stable/10/contrib/ntp/util/ntp-keygen.mdoc.in stable/10/usr.sbin/ntp/config.h stable/10/usr.sbin/ntp/doc/ntp-keygen.8 stable/10/usr.sbin/ntp/doc/ntp.conf.5 stable/10/usr.sbin/ntp/doc/ntp.keys.5 stable/10/usr.sbin/ntp/doc/ntpd.8 stable/10/usr.sbin/ntp/doc/ntpdc.8 stable/10/usr.sbin/ntp/doc/ntpq.8 stable/10/usr.sbin/ntp/doc/sntp.8 stable/10/usr.sbin/ntp/scripts/mkver Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/ntp/COPYRIGHT ============================================================================== --- stable/10/contrib/ntp/COPYRIGHT Tue Mar 28 04:48:17 2017 (r316068) +++ stable/10/contrib/ntp/COPYRIGHT Tue Mar 28 04:48:55 2017 (r316069) @@ -4,7 +4,7 @@ This file is automatically generated fro jpg "Clone me," says Dolly sheepishly. - Last update: 17-Jan-2015 00:16 UTC + Last update: 2-Jan-2017 11:58 UTC _________________________________________________________________ The following copyright notice applies to all files collectively @@ -33,7 +33,7 @@ This file is automatically generated fro Burnicki is: *********************************************************************** * * -* Copyright (c) Network Time Foundation 2011-2015 * +* Copyright (c) Network Time Foundation 2011-2017 * * * * All Rights Reserved * * * Modified: stable/10/contrib/ntp/ChangeLog ============================================================================== --- stable/10/contrib/ntp/ChangeLog Tue Mar 28 04:48:17 2017 (r316068) +++ stable/10/contrib/ntp/ChangeLog Tue Mar 28 04:48:55 2017 (r316069) @@ -1,6 +1,77 @@ --- +(4.2.8p10-win-beta1) 2017/03/21 Released by Harlan Stenn +(4.2.8p10) + +* [Sec 3389] NTP-01-016: Denial of Service via Malformed Config + (Pentest report 01.2017) +* [Sec 3388] NTP-01-014: Buffer Overflow in DPTS Clock + (Pentest report 01.2017) +* [Sec 3387] NTP-01-012: Authenticated DoS via Malicious Config Option + (Pentest report 01.2017) +* [Sec 3386] NTP-01-011: ntpq_stripquotes() returns incorrect Value + (Pentest report 01.2017) +* [Sec 3385] NTP-01-010: ereallocarray()/eallocarray() underused. HStenn +* [Sec 3384] NTP-01-009: Privileged execution of User Library code + (Pentest report 01.2017) +* [Sec 3383] NTP-01-008: Stack Buffer Overflow from Command Line + (Pentest report 01.2017) +* [Sec 3382] NTP-01-007: Data Structure terminated insufficiently + (Pentest report 01.2017) +* [Sec 3380] NTP-01-005: Off-by-one in Oncore GPS Receiver + (Pentest report 01.2017) +* [Sec 3379] NTP-01-004: Potential Overflows in ctl_put() functions + (Pentest report 01.2017) +* [Sec 3378] NTP-01-003: Improper use of snprintf() in mx4200_send() + (Pentest report 01.2017) +* [Sec 3377] NTP-01-002: Buffer Overflow in ntpq when fetching reslist + (Pentest report 01.2017) +* [Bug 3363] Support for openssl-1.1.0 without compatibility modes + - rework of patch set from . +* [Bug 3356] Bugfix 3072 breaks multicastclient +* [Bug 3216] libntp audio ioctl() args incorrectly cast to int + on 4.4BSD-Lite derived platforms + - original patch by Majdi S. Abbas +* [Bug 3215] 'make distcheck' fails with new BK repo format +* [Bug 3173] forking async worker: interrupted pipe I/O + - initial patch by Christos Zoulas +* [Bug 3139] (...) time_pps_create: Exec format error + - move loader API from 'inline' to proper source + - augment pathless dlls with absolute path to NTPD + - use 'msyslog()' instead of 'printf() 'for reporting trouble +* [Bug 3107] Incorrect Logic for Peer Event Limiting + - applied patch by Matthew Van Gundy +* [Bug 3065] Quiet warnings on NetBSD + - applied some of the patches provided by Havard. Not all of them + still match the current code base, and I did not touch libopt. +* [Bug 3062] Change the process name of forked DNS worker + - applied patch by Reinhard Max. See bugzilla for limitations. +* [Bug 2923] Trap Configuration Fail + - fixed dependency inversion from [Bug 2837] +* [Bug 2896] Nothing happens if minsane < maxclock < minclock + - produce ERROR log message about dysfunctional daemon. +* [Bug 2851] allow -4/-6 on restrict line with mask + - applied patch by Miroslav Lichvar for ntp4.2.6 compat +* [Bug 2645] out-of-bound pointers in ctl_putsys and decode_bitflags + - Fixed these and some more locations of this pattern. + Probably din't get them all, though. +* Update copyright year. +* bk-7 trigger updates + +--- +(4.2.8p9-win) 2017/02/01 Released by Harlan Stenn + +* [Bug 3144] NTP does not build without openSSL. + - added missed changeset for automatic openssl lib detection + - fixed some minor warning issues +* [Bug 3095] More compatibility with openssl 1.1. +* configure.ac cleanup. stenn@ntp.org +* openssl configure cleanup. stenn@ntp.org + +--- (4.2.8p9) 2016/11/21 Released by Harlan Stenn -(4.2.8p9) 2016/MM/DD Released by Harlan Stenn * [Sec 3119] Trap crash * [Sec 3118] Mode 6 information disclosure and DDoS vector Modified: stable/10/contrib/ntp/CommitLog ============================================================================== --- stable/10/contrib/ntp/CommitLog Tue Mar 28 04:48:17 2017 (r316068) +++ stable/10/contrib/ntp/CommitLog Tue Mar 28 04:48:55 2017 (r316069) @@ -1,3 +1,441 @@ +ChangeSet@1.3729, 2017-02-01 07:39:35-05:00, stenn@deacon.udel.edu + NTP_4_2_8P9_WIN + TAG: NTP_4_2_8P9_WIN + + ChangeLog@1.1857 +3 -0 + NTP_4_2_8P9_WIN + + ntpd/invoke-ntp.conf.texi@1.204 +1 -1 + NTP_4_2_8P9_WIN + + ntpd/invoke-ntp.keys.texi@1.193 +1 -1 + NTP_4_2_8P9_WIN + + ntpd/invoke-ntpd.texi@1.509 +2 -2 + NTP_4_2_8P9_WIN + + ntpd/ntp.conf.5man@1.238 +3 -3 + NTP_4_2_8P9_WIN + + ntpd/ntp.conf.5mdoc@1.238 +2 -2 + NTP_4_2_8P9_WIN + + ntpd/ntp.conf.html@1.188 +1 -1 + NTP_4_2_8P9_WIN + + ntpd/ntp.conf.man.in@1.238 +3 -3 + NTP_4_2_8P9_WIN + + ntpd/ntp.conf.mdoc.in@1.238 +2 -2 + NTP_4_2_8P9_WIN + + ntpd/ntp.keys.5man@1.227 +2 -2 + NTP_4_2_8P9_WIN + + ntpd/ntp.keys.5mdoc@1.227 +2 -2 + NTP_4_2_8P9_WIN + + ntpd/ntp.keys.html@1.189 +1 -1 + NTP_4_2_8P9_WIN + + ntpd/ntp.keys.man.in@1.227 +2 -2 + NTP_4_2_8P9_WIN + + ntpd/ntp.keys.mdoc.in@1.227 +2 -2 + NTP_4_2_8P9_WIN + + ntpd/ntpd-opts.c@1.531 +245 -245 + NTP_4_2_8P9_WIN + + ntpd/ntpd-opts.h@1.530 +3 -3 + NTP_4_2_8P9_WIN + + ntpd/ntpd.1ntpdman@1.338 +3 -3 + NTP_4_2_8P9_WIN + + ntpd/ntpd.1ntpdmdoc@1.338 +2 -2 + NTP_4_2_8P9_WIN + + ntpd/ntpd.html@1.182 +2 -2 + NTP_4_2_8P9_WIN + + ntpd/ntpd.man.in@1.338 +3 -3 + NTP_4_2_8P9_WIN + + ntpd/ntpd.mdoc.in@1.338 +2 -2 + NTP_4_2_8P9_WIN + + ntpdc/invoke-ntpdc.texi@1.506 +2 -2 + NTP_4_2_8P9_WIN + + ntpdc/ntpdc-opts.c@1.524 +107 -107 + NTP_4_2_8P9_WIN + + ntpdc/ntpdc-opts.h@1.523 +3 -3 + NTP_4_2_8P9_WIN + + ntpdc/ntpdc.1ntpdcman@1.337 +3 -3 + NTP_4_2_8P9_WIN + + ntpdc/ntpdc.1ntpdcmdoc@1.337 +2 -2 + NTP_4_2_8P9_WIN + + ntpdc/ntpdc.html@1.350 +2 -2 + NTP_4_2_8P9_WIN + + ntpdc/ntpdc.man.in@1.337 +3 -3 + NTP_4_2_8P9_WIN + + ntpdc/ntpdc.mdoc.in@1.337 +2 -2 + NTP_4_2_8P9_WIN + + ntpq/invoke-ntpq.texi@1.514 +2 -2 + NTP_4_2_8P9_WIN + + ntpq/ntpq-opts.c@1.531 +114 -114 + NTP_4_2_8P9_WIN + + ntpq/ntpq-opts.h@1.529 +3 -3 + NTP_4_2_8P9_WIN + + ntpq/ntpq.1ntpqman@1.342 +3 -3 + NTP_4_2_8P9_WIN + + ntpq/ntpq.1ntpqmdoc@1.342 +2 -2 + NTP_4_2_8P9_WIN + + ntpq/ntpq.html@1.179 +2 -2 + NTP_4_2_8P9_WIN + + ntpq/ntpq.man.in@1.342 +3 -3 + NTP_4_2_8P9_WIN + + ntpq/ntpq.mdoc.in@1.342 +2 -2 + NTP_4_2_8P9_WIN + + ntpsnmpd/invoke-ntpsnmpd.texi@1.508 +11 -10 + NTP_4_2_8P9_WIN + + ntpsnmpd/ntpsnmpd-opts.c@1.526 +68 -68 + NTP_4_2_8P9_WIN + + ntpsnmpd/ntpsnmpd-opts.h@1.525 +3 -3 + NTP_4_2_8P9_WIN + + ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.337 +3 -3 + NTP_4_2_8P9_WIN + + ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.337 +2 -2 + NTP_4_2_8P9_WIN + + ntpsnmpd/ntpsnmpd.html@1.177 +1 -1 + NTP_4_2_8P9_WIN + + ntpsnmpd/ntpsnmpd.man.in@1.337 +3 -3 + NTP_4_2_8P9_WIN + + ntpsnmpd/ntpsnmpd.mdoc.in@1.337 +2 -2 + NTP_4_2_8P9_WIN + + packageinfo.sh@1.534 +1 -1 + NTP_4_2_8P9_WIN + + scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.98 +3 -3 + NTP_4_2_8P9_WIN + + scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.99 +2 -2 + NTP_4_2_8P9_WIN + + scripts/calc_tickadj/calc_tickadj.html@1.100 +1 -1 + NTP_4_2_8P9_WIN + + scripts/calc_tickadj/calc_tickadj.man.in@1.97 +3 -3 + NTP_4_2_8P9_WIN + + scripts/calc_tickadj/calc_tickadj.mdoc.in@1.99 +2 -2 + NTP_4_2_8P9_WIN + + scripts/calc_tickadj/invoke-calc_tickadj.texi@1.102 +1 -1 + NTP_4_2_8P9_WIN + + scripts/invoke-plot_summary.texi@1.120 +2 -2 + NTP_4_2_8P9_WIN + + scripts/invoke-summary.texi@1.119 +2 -2 + NTP_4_2_8P9_WIN + + scripts/ntp-wait/invoke-ntp-wait.texi@1.329 +2 -2 + NTP_4_2_8P9_WIN + + scripts/ntp-wait/ntp-wait-opts@1.65 +2 -2 + NTP_4_2_8P9_WIN + + scripts/ntp-wait/ntp-wait.1ntp-waitman@1.326 +3 -3 + NTP_4_2_8P9_WIN + + scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.327 +2 -2 + NTP_4_2_8P9_WIN + + scripts/ntp-wait/ntp-wait.html@1.346 +2 -2 + NTP_4_2_8P9_WIN + + scripts/ntp-wait/ntp-wait.man.in@1.326 +3 -3 + NTP_4_2_8P9_WIN + + scripts/ntp-wait/ntp-wait.mdoc.in@1.327 +2 -2 + NTP_4_2_8P9_WIN + + scripts/ntpsweep/invoke-ntpsweep.texi@1.117 +2 -2 + NTP_4_2_8P9_WIN + + scripts/ntpsweep/ntpsweep-opts@1.67 +2 -2 + NTP_4_2_8P9_WIN + + scripts/ntpsweep/ntpsweep.1ntpsweepman@1.105 +3 -3 + NTP_4_2_8P9_WIN + + scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.105 +2 -2 + NTP_4_2_8P9_WIN + + scripts/ntpsweep/ntpsweep.html@1.118 +2 -2 + NTP_4_2_8P9_WIN + + scripts/ntpsweep/ntpsweep.man.in@1.105 +3 -3 + NTP_4_2_8P9_WIN + + scripts/ntpsweep/ntpsweep.mdoc.in@1.106 +2 -2 + NTP_4_2_8P9_WIN + + scripts/ntptrace/invoke-ntptrace.texi@1.118 +2 -2 + NTP_4_2_8P9_WIN + + scripts/ntptrace/ntptrace-opts@1.67 +2 -2 + NTP_4_2_8P9_WIN + + scripts/ntptrace/ntptrace.1ntptraceman@1.105 +3 -3 + NTP_4_2_8P9_WIN + + scripts/ntptrace/ntptrace.1ntptracemdoc@1.106 +2 -2 + NTP_4_2_8P9_WIN + + scripts/ntptrace/ntptrace.html@1.119 +2 -2 + NTP_4_2_8P9_WIN + + scripts/ntptrace/ntptrace.man.in@1.105 +3 -3 + NTP_4_2_8P9_WIN + + scripts/ntptrace/ntptrace.mdoc.in@1.107 +2 -2 + NTP_4_2_8P9_WIN + + scripts/plot_summary-opts@1.68 +2 -2 + NTP_4_2_8P9_WIN + + scripts/plot_summary.1plot_summaryman@1.118 +3 -3 + NTP_4_2_8P9_WIN + + scripts/plot_summary.1plot_summarymdoc@1.118 +2 -2 + NTP_4_2_8P9_WIN + + scripts/plot_summary.html@1.121 +2 -2 + NTP_4_2_8P9_WIN + + scripts/plot_summary.man.in@1.118 +3 -3 + NTP_4_2_8P9_WIN + + scripts/plot_summary.mdoc.in@1.118 +2 -2 + NTP_4_2_8P9_WIN + + scripts/summary-opts@1.67 +2 -2 + NTP_4_2_8P9_WIN + + scripts/summary.1summaryman@1.117 +3 -3 + NTP_4_2_8P9_WIN + + scripts/summary.1summarymdoc@1.117 +2 -2 + NTP_4_2_8P9_WIN + + scripts/summary.html@1.120 +2 -2 + NTP_4_2_8P9_WIN + + scripts/summary.man.in@1.117 +3 -3 + NTP_4_2_8P9_WIN + + scripts/summary.mdoc.in@1.117 +2 -2 + NTP_4_2_8P9_WIN + + scripts/update-leap/invoke-update-leap.texi@1.18 +1 -1 + NTP_4_2_8P9_WIN + + scripts/update-leap/update-leap-opts@1.18 +2 -2 + NTP_4_2_8P9_WIN + + scripts/update-leap/update-leap.1update-leapman@1.18 +3 -3 + NTP_4_2_8P9_WIN + + scripts/update-leap/update-leap.1update-leapmdoc@1.18 +2 -2 + NTP_4_2_8P9_WIN + + scripts/update-leap/update-leap.html@1.18 +1 -1 + NTP_4_2_8P9_WIN + + scripts/update-leap/update-leap.man.in@1.18 +3 -3 + NTP_4_2_8P9_WIN + + scripts/update-leap/update-leap.mdoc.in@1.18 +2 -2 + NTP_4_2_8P9_WIN + + sntp/invoke-sntp.texi@1.506 +2 -2 + NTP_4_2_8P9_WIN + + sntp/sntp-opts.c@1.525 +159 -159 + NTP_4_2_8P9_WIN + + sntp/sntp-opts.h@1.523 +3 -3 + NTP_4_2_8P9_WIN + + sntp/sntp.1sntpman@1.341 +3 -3 + NTP_4_2_8P9_WIN + + sntp/sntp.1sntpmdoc@1.341 +2 -2 + NTP_4_2_8P9_WIN + + sntp/sntp.html@1.521 +2 -2 + NTP_4_2_8P9_WIN + + sntp/sntp.man.in@1.341 +3 -3 + NTP_4_2_8P9_WIN + + sntp/sntp.mdoc.in@1.341 +2 -2 + NTP_4_2_8P9_WIN + + util/invoke-ntp-keygen.texi@1.509 +2 -2 + NTP_4_2_8P9_WIN + + util/ntp-keygen-opts.c@1.527 +173 -173 + NTP_4_2_8P9_WIN + + util/ntp-keygen-opts.h@1.525 +3 -3 + NTP_4_2_8P9_WIN + + util/ntp-keygen.1ntp-keygenman@1.337 +3 -3 + NTP_4_2_8P9_WIN + + util/ntp-keygen.1ntp-keygenmdoc@1.337 +2 -2 + NTP_4_2_8P9_WIN + + util/ntp-keygen.html@1.183 +2 -2 + NTP_4_2_8P9_WIN + + util/ntp-keygen.man.in@1.337 +3 -3 + NTP_4_2_8P9_WIN + + util/ntp-keygen.mdoc.in@1.337 +2 -2 + NTP_4_2_8P9_WIN + +ChangeSet@1.3728, 2017-01-28 09:32:36-05:00, stenn@pogo.udel.edu + typos + + sntp/m4/ntp_openssl.m4@1.26 +13 -13 + typos + +ChangeSet@1.3726, 2017-01-27 11:21:38+00:00, stenn@psp-deb1.ntp.org + ntp-4.2.8p9-win + + ChangeLog@1.1855 +4 -1 + ntp-4.2.8p9-win + + packageinfo.sh@1.533 +1 -1 + ntp-4.2.8p9-win + +ChangeSet@1.3725, 2017-01-27 11:09:20+00:00, stenn@psp-deb1.ntp.org + bk-7 repos don't have a ChangeSet file + + sntp/Makefile.am@1.89 +1 -1 + bk-7 repos don't have a ChangeSet file + +ChangeSet@1.3724, 2017-01-21 15:12:35+01:00, perlinger@ntp.org + [Bug 3144] NTP does not build without openSSL + - pulled missing changeset, minor warning fixes + + ChangeLog@1.1854 +2 -1 + [Bug 3144] NTP does not build without openSSL + - pulled missing changeset, minor warning fixes + + include/ssl_applink.c@1.3 +9 -1 + [Bug 3144] NTP does not build without openSSL + - minor warning fixes + + ports/winnt/ntpd/ntservice.c@1.31 +1 -0 + [Bug 3144] NTP does not build without openSSL + - pulled missing changeset, minor warning fixes + +ChangeSet@1.3720.1.2, 2017-01-10 06:07:05-05:00, stenn@pogo.udel.edu + configure.ac cleanup + + ChangeLog@1.1852.1.1 +5 -0 + configure.ac cleanup + + configure.ac@1.607 +1 -1 + configure.ac cleanup + +ChangeSet@1.3720.1.1, 2017-01-10 06:05:44-05:00, stenn@pogo.udel.edu + openssl configure cleanup + + sntp/m4/ntp_libntp.m4@1.34 +1 -3 + openssl configure cleanup + + sntp/m4/ntp_openssl.m4@1.25 +19 -1 + openssl configure cleanup + +ChangeSet@1.3722, 2016-11-23 08:34:52+01:00, perlinger@ntp.org + Bug 3144 - NTP does not build without openSSL + - fix SNTP to build '--without-crypto',too + - remove some warnings that result from '--without-crypto' + + ntpd/ntp_control.c@1.215 +4 -1 + Bug 3144 - NTP does not build without openSSL + - remove some warnings that result from '--without-crypto' + + ntpd/ntp_proto.c@1.398 +1 -1 + Bug 3144 - NTP does not build without openSSL + - remove some warnings that result from '--without-crypto' + + sntp/crypto.c@1.24 +1 -1 + Bug 3144 - NTP does not build without openSSL + - fix SNTP to build '--without-crypto', too + +ChangeSet@1.3721, 2016-11-22 22:22:46+01:00, perlinger@ntp.org + [Bug 3144] NTP does not build without openSSL + + ChangeLog@1.1853 +3 -1 + [Bug 3144] NTP does not build without openSSL + + include/ntp_md5.h@1.11 +4 -0 + [Bug 3144] NTP does not build without openSSL + - pull in "libssl_compat.h" if built with openssl + - provide compliant API otherwise + + libntp/a_md5encrypt.c@1.40 +0 -1 + [Bug 3144] NTP does not build without openSSL + - do not directly include "libssl_compat.h" -- comes with "ntp_md5.h" + + libntp/libssl_compat.c@1.2.1.1 +10 -7 + [Bug 3144] NTP does not build without openSSL + - compiles code only if openssl is indeed required + + ntpd/ntp_control.c@1.214 +1 -3 + [Bug 3144] NTP does not build without openSSL + - do not directly include "libssl_compat.h" -- comes with "ntp_md5.h" + - fix long-standing warning + + ntpd/ntp_io.c@1.418 +9 -5 + [Bug 3144] NTP does not build without openSSL + - sidekick: Fix annoying warnings for Debug Build (Win64/32 issue) + + ports/winnt/ntpd/ntp_iocompletionport.c@1.78 +4 -6 + [Bug 3144] NTP does not build without openSSL + - sidekick: Fix annoying warnings MSVC emits + ChangeSet@1.3720, 2016-11-21 08:08:21-05:00, stenn@deacon.udel.edu NTP_4_2_8P9 TAG: NTP_4_2_8P9 @@ -557,7 +995,6 @@ ChangeSet@1.3701, 2016-10-24 07:37:25+02 [winio2 - unlocked] - eliminate critical section, simplify API - the great renaming - ChangeSet@1.3698.1.7, 2016-10-23 05:18:04+00:00, stenn@psp-deb1.ntp.org ntp-4.2.8p9-PRE @@ -889,7 +1326,7 @@ ChangeSet@1.3698.1.7, 2016-10-23 05:18:0 util/ntp-keygen.mdoc.in@1.335 +2 -2 ntp-4.2.8p9-PRE -ChangeSet@1.3688.4.1, 2016-10-20 19:28:06+00:00, stenn@psp-deb1.ntp.org +ChangeSet@1.3688.5.1, 2016-10-20 19:28:06+00:00, stenn@psp-deb1.ntp.org cleanup ChangeLog@1.1836.4.1 +1 -0 @@ -910,7 +1347,6 @@ ChangeSet@1.3686.19.1, 2016-10-20 09:21: ChangeLog@1.1834.19.1 +4 -0 [Sec 3113] Broadcast Mode Poll Interval Enforcement DoS - include/ntp.h@1.220.1.1 +1 -1 [Sec 3113] Broadcast Mode Poll Interval Enforcement DoS @@ -953,7 +1389,7 @@ ChangeSet@1.3698.1.2, 2016-10-10 22:34:5 tests/bug-3102/zeroorg.py@1.0 +0 -0 -ChangeSet@1.3688.3.2, 2016-10-10 01:46:05-07:00, harlan@max.pfcs.com +ChangeSet@1.3688.4.1, 2016-10-10 01:46:05-07:00, harlan@max.pfcs.com Fix typos in include/ntp.h ChangeLog@1.1836.3.1 +1 -0 @@ -989,6 +1425,89 @@ ChangeSet@1.3699, 2016-10-04 08:36:17+02 [Bug 3125] NTPD doesn't fully start when ntp.conf entries are out of order using the loopback-ppsapi-provider.dll - fix wrong instance initialisation +ChangeSet@1.3688.3.2, 2016-10-02 09:01:53+02:00, perlinger@ntp.org + [Bug 3095] Compatibility with openssl 1.1 + - add autolib hader + - fix linker input selection + + include/ssl_applink.c@1.2 +15 -3 + [Bug 3095] Compatibility with openssl 1.1 + - the graet renaming of v1.1.0 + + libntp/libssl_compat.c@1.3 +4 -0 + [Bug 3095] Compatibility with openssl 1.1 + - make sure 'inttypes.h' is included before SSL headers (macro definitiion order) + + ports/winnt/include/msvc_ssl_autolib.h@1.1 +94 -0 + [Bug 3095] Compatibility with openssl 1.1 + create automagic library selection header + + ports/winnt/include/msvc_ssl_autolib.h@1.0 +0 -0 + + ports/winnt/vs2008/debug-x64.vsprops@1.2 +2 -2 + [Bug 3095] Compatibility with openssl 1.1 + - fix linker input selection + + ports/winnt/vs2008/debug.vsprops@1.2 +1 -1 + [Bug 3095] Compatibility with openssl 1.1 + - fix linker input selection + + ports/winnt/vs2008/release-x64.vsprops@1.2 +1 -1 + [Bug 3095] Compatibility with openssl 1.1 + - fix linker input selection + + ports/winnt/vs2008/release.vsprops@1.2 +1 -1 + [Bug 3095] Compatibility with openssl 1.1 + - fix linker input selection + + ports/winnt/vs2013/debug-x64.props@1.3 +1 -1 + [Bug 3095] Compatibility with openssl 1.1 + - fix linker input selection + + ports/winnt/vs2013/debug.props@1.2 +1 -1 + [Bug 3095] Compatibility with openssl 1.1 + - fix linker input selection + + ports/winnt/vs2013/libntp/libntp.vcxproj@1.13 +2 -1 + [Bug 3095] Compatibility with openssl 1.1 + - add autolib hader + + ports/winnt/vs2013/libntp/libntp.vcxproj.filters@1.11 +3 -0 + [Bug 3095] Compatibility with openssl 1.1 + - add autolib hader + + ports/winnt/vs2013/release-x64.props@1.3 +1 -1 + [Bug 3095] Compatibility with openssl 1.1 + - fix linker input selection + + ports/winnt/vs2013/release.props@1.2 +1 -1 + [Bug 3095] Compatibility with openssl 1.1 + - fix linker input selection + + ports/winnt/vs2015/debug-x64.props@1.2 +1 -1 + [Bug 3095] Compatibility with openssl 1.1 + - fix linker input selection + + ports/winnt/vs2015/debug.props@1.2 +1 -1 + [Bug 3095] Compatibility with openssl 1.1 + - fix linker input selection + + ports/winnt/vs2015/libntp/libntp.vcxproj@1.3 +1 -0 + [Bug 3095] Compatibility with openssl 1.1 + - add autolib hader + + ports/winnt/vs2015/libntp/libntp.vcxproj.filters@1.3 +3 -0 + [Bug 3095] Compatibility with openssl 1.1 + - add autolib hader + + ports/winnt/vs2015/release-x64.props@1.2 +1 -1 + [Bug 3095] Compatibility with openssl 1.1 + - fix linker input selection + + ports/winnt/vs2015/release.props@1.2 +1 -1 + [Bug 3095] Compatibility with openssl 1.1 + - fix linker input selection + ChangeSet@1.3698, 2016-10-01 10:52:11+00:00, stenn@psp-deb1.ntp.org Update NEWS for 3119 @@ -8089,31 +8608,24 @@ ChangeSet@1.3552.1.13, 2015-08-20 10:15: sntp/libevent/test/bench_httpclient.c@1.8 +5 -1 reverted emalloc (and similar) to malloc + added checks if malloc is NULL, because emalloc is not linked here. - sntp/libevent/test/regress.c@1.8 +6 -2 reverted emalloc (and similar) to malloc + added checks if malloc is NULL, because emalloc is not linked here. - sntp/libevent/test/regress_dns.c@1.10 +6 -5 reverted emalloc (and similar) to malloc + added checks if malloc is NULL, because emalloc is not linked here. - sntp/libevent/test/regress_http.c@1.10 +8 -4 reverted emalloc (and similar) to malloc + added checks if malloc is NULL, because emalloc is not linked here. - sntp/libevent/test/regress_minheap.c@1.5 +2 -1 reverted emalloc (and similar) to malloc + added checks if malloc is NULL, because emalloc is not linked here. - sntp/libevent/test/test-ratelim.c@1.11 +6 -2 reverted emalloc (and similar) to malloc + added checks if malloc is NULL, because emalloc is not linked here. - sntp/libevent/test/test-time.c@1.7 +2 -1 reverted emalloc (and similar) to malloc + added checks if malloc is NULL, because emalloc is not linked here. - ChangeSet@1.3552.1.12, 2015-08-20 01:10:57+02:00, viperus@ubuntu.(none) Makefile.am: @@ -8151,67 +8663,51 @@ ChangeSet@1.3552.1.10, 2015-08-20 00:23: ntpd/refclock_palisade.c@1.43 +2 -2 Fixing bug 2898, replacing malloc with emalloc, calloc with emalloc_zero, strdup with estrup etc. - ntpq/ntpq.c@1.161 +7 -7 Fixing bug 2898, replacing malloc with emalloc, calloc with emalloc_zero, strdup with estrup etc. - sntp/libevent/sample/http-server.c@1.11 +2 -2 Fixing bug 2898, replacing malloc with emalloc, calloc with emalloc_zero, strdup with estrup etc. - sntp/libevent/test/bench_httpclient.c@1.7 +1 -1 Fixing bug 2898, replacing malloc with emalloc, calloc with emalloc_zero, strdup with estrup etc. - sntp/libevent/test/regress.c@1.7 +2 -2 Fixing bug 2898, replacing malloc with emalloc, calloc with emalloc_zero, strdup with estrup etc. - sntp/libevent/test/regress_dns.c@1.9 +4 -4 Fixing bug 2898, replacing malloc with emalloc, calloc with emalloc_zero, strdup with estrup etc. - sntp/libevent/test/regress_http.c@1.9 +3 -3 Fixing bug 2898, replacing malloc with emalloc, calloc with emalloc_zero, strdup with estrup etc. - sntp/libevent/test/regress_minheap.c@1.4 +1 -1 Fixing bug 2898, replacing malloc with emalloc, calloc with emalloc_zero, strdup with estrup etc. - sntp/libevent/test/test-ratelim.c@1.10 +2 -2 Fixing bug 2898, replacing malloc with emalloc, calloc with emalloc_zero, strdup with estrup etc. - sntp/libevent/test/test-time.c@1.6 +1 -1 Fixing bug 2898, replacing malloc with emalloc, calloc with emalloc_zero, strdup with estrup etc. - sntp/libopts/compat/pathfind.c@1.12 +5 -5 Fixing bug 2898, replacing malloc with emalloc, calloc with emalloc_zero, strdup with estrup etc. - sntp/tests/fileHandlingTest.c@1.3 +1 -1 Fixing bug 2898, replacing malloc with emalloc, calloc with emalloc_zero, strdup with estrup etc. - sntp/tests/packetProcessing.c@1.8 +1 -1 Fixing bug 2898, replacing malloc with emalloc, calloc with emalloc_zero, strdup with estrup etc. - tests/libntp/a_md5encrypt.c@1.12 +1 -1 Fixing bug 2898, replacing malloc with emalloc, calloc with emalloc_zero, strdup with estrup etc. - tests/libntp/calendar.c@1.6.1.1 +4 -4 Fixing bug 2898, replacing malloc with emalloc, calloc with emalloc_zero, strdup with estrup etc. - tests/libntp/caljulian.c@1.10 +1 -1 Fixing bug 2898, replacing malloc with emalloc, calloc with emalloc_zero, strdup with estrup etc. - ChangeSet@1.3552.1.9, 2015-08-17 13:56:23+02:00, viperus@ubuntu.(none) Makefile.am: @@ -8595,7 +9091,6 @@ ChangeSet@1.3548.1.13, 2015-08-06 20:41: tests/libntp/socktoa.c@1.9 +2 -2 fixed. Tests are skipped when you do ./build --disable-ipv6 - tests/ntpq/Makefile.am@1.2 +8 -37 changes @@ -8636,7 +9131,6 @@ ChangeSet@1.3548.1.11, 2015-08-06 10:27: tests/libntp/run-socktoa.c@1.11 +7 -7 Minor changes due to the autogenerated ruby script - tests/libntp/socktoa.c@1.8 +22 -6 update @@ -8811,8 +9305,6 @@ ChangeSet@1.3548.1.2, 2015-08-01 22:40:5 Added test ntp_singd again, renamed it to ntp_signdT (including the original ntp_signd.c doesn't work if you have 2 files with the same name). I included the original ntp_signd.c, so static functions can be tested. Additional .o objects had to be added for everyhting to work. - - tests/ntpd/ntp_signdT.c@1.2 +17 -2 MUST ADD #define HAVE_NTP_NAME above the #include "ntp_NAME.c" @@ -8918,15 +9410,12 @@ ChangeSet@1.3529.1.18, 2015-07-27 19:46: tests/libntp/run-lfptostr.c@1.6 +11 -11 update - tests/libntp/run-netof.c@1.6 +0 -1 update - tests/libntp/run-socktoa.c@1.9 +6 -6 update - tests/ntpd/Makefile.am@1.6.1.4 +8 -3 Merge @@ -8942,11 +9431,9 @@ ChangeSet@1.3529.1.18, 2015-07-27 19:46: tests/ntpd/run-ntp_signd.c@1.3 +2 -2 update - tests/ntpd/run-rc_cmdlength.c@1.2 +8 -3 update - ChangeSet@1.3543, 2015-07-27 04:11:08+00:00, stenn@psp-at1.ntp.org [Bug 2595] ntpdate man page quirks. Hal Murray, Harlan Stenn @@ -9192,165 +9679,126 @@ ChangeSet@1.3529.1.10, 2015-07-25 16:54: tests/libntp/netof.c@1.3.1.1 +8 -0 adding declarations - tests/libntp/numtoa.c@1.6 +2 -0 adding declarations - tests/libntp/numtohost.c@1.5 +2 -0 adding declarations - tests/libntp/octtoint.c@1.3.1.1 +10 -0 adding declarations - tests/libntp/prettydate.c@1.3 +3 -0 adding declarations - tests/libntp/recvbuff.c@1.5 +4 -0 adding declarations - tests/libntp/refidsmear.c@1.5 +6 -3 adding declarations - tests/libntp/refnumtoa.c@1.5 +4 -0 adding declarations - tests/libntp/run-clocktime.c@1.9 +1 -1 update tests/libntp/run-lfpfunc.c@1.16 +9 -9 update - tests/libntp/run-netof.c@1.5 +4 -4 update - tests/libntp/run-numtoa.c@1.9 +2 -2 update - tests/libntp/run-numtohost.c@1.9 +1 -1 update - tests/libntp/run-octtoint.c@1.6 +7 -7 update - tests/libntp/run-prettydate.c@1.4 +1 -1 update - tests/libntp/run-recvbuff.c@1.4 +3 -3 update - tests/libntp/run-refidsmear.c@1.5 +1 -1 update - tests/libntp/run-refnumtoa.c@1.7 +2 -2 update - tests/libntp/run-sfptostr.c@1.4 +7 -7 update - tests/libntp/run-socktoa.c@1.8 +6 -6 update - tests/libntp/run-ssl_init.c@1.8 +5 -5 update - tests/libntp/run-statestr.c@1.9 +4 -4 update - tests/libntp/run-strtolfp.c@1.4 +6 -6 update - tests/libntp/run-timespecops.c@1.9 +28 -28 update - tests/libntp/run-timevalops.c@1.11 +28 -28 update - tests/libntp/run-tstotv.c@1.4 +3 -3 update - tests/libntp/run-tvtots.c@1.5 +3 -3 update - tests/libntp/run-vi64ops.c@1.7 +3 -3 update - tests/libntp/run-ymd2yd.c@1.10 +4 -4 update - tests/libntp/sfptostr.c@1.3 +10 -0 update - tests/libntp/sockaddrtest.c@1.2 +1 -0 update - tests/libntp/socktoa.c@1.3.1.1 +6 -0 added declarations tests/libntp/ssl_init.c@1.8 +6 -0 added declarations - tests/libntp/statestr.c@1.5 +4 -0 added declarations - tests/libntp/strtolfp.c@1.2.1.1 +9 -0 added declarations - tests/libntp/timespecops.c@1.8 +40 -1 added declarations - tests/libntp/timevalops.c@1.11 +37 -1 added declarations - tests/libntp/tstotv.c@1.3 +5 -0 added declarations - tests/libntp/tvtots.c@1.5 +3 -0 added declarations - tests/libntp/vi64ops.c@1.6 +6 -0 added declarations - tests/libntp/ymd2yd.c@1.6 +5 -0 added declarations - ChangeSet@1.3536, 2015-07-25 02:08:32+02:00, tomek@tomek-n56vz.(none) run-ntp_restrict.c: @@ -9408,57 +9856,45 @@ ChangeSet@1.3529.1.9, 2015-07-24 18:38:0 tests/libntp/calendar.c@1.6 +42 -18 added function declarations + minor comment fixes - tests/libntp/caljulian.c@1.9 +10 -0 added declarations tests/libntp/caltontp.c@1.3 +5 -0 added declarations - *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable-10@freebsd.org Tue Mar 28 05:57:21 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 92F9ED21803; Tue, 28 Mar 2017 05:57:21 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 48436E6C; Tue, 28 Mar 2017 05:57:21 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2S5vKDb002721; Tue, 28 Mar 2017 05:57:20 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2S5vKjc002719; Tue, 28 Mar 2017 05:57:20 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201703280557.v2S5vKjc002719@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 28 Mar 2017 05:57:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r316070 - stable/10/lib/libkvm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Mar 2017 05:57:21 -0000 Author: ngie Date: Tue Mar 28 05:57:20 2017 New Revision: 316070 URL: https://svnweb.freebsd.org/changeset/base/316070 Log: MFC r315647: Handle kd == NULL gracefully with kvm_close(3) Don't segfault in kvm_close(3) if provided a NULL pointer. Instead, return -1 and set errno to EINVAL. Document this new behavior explicitly. Modified: stable/10/lib/libkvm/kvm.c stable/10/lib/libkvm/kvm_open.3 Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libkvm/kvm.c ============================================================================== --- stable/10/lib/libkvm/kvm.c Tue Mar 28 04:48:55 2017 (r316069) +++ stable/10/lib/libkvm/kvm.c Tue Mar 28 05:57:20 2017 (r316070) @@ -262,6 +262,10 @@ kvm_close(kvm_t *kd) { int error = 0; + if (kd == NULL) { + errno = EINVAL; + return (-1); + } if (kd->pmfd >= 0) error |= close(kd->pmfd); if (kd->vmfd >= 0) Modified: stable/10/lib/libkvm/kvm_open.3 ============================================================================== --- stable/10/lib/libkvm/kvm_open.3 Tue Mar 28 04:48:55 2017 (r316069) +++ stable/10/lib/libkvm/kvm_open.3 Tue Mar 28 05:57:20 2017 (r316070) @@ -32,7 +32,7 @@ .\" @(#)kvm_open.3 8.3 (Berkeley) 4/19/94 .\" $FreeBSD$ .\" -.Dd January 29, 2004 +.Dd March 20, 2017 .Dt KVM_OPEN 3 .Os .Sh NAME @@ -181,10 +181,29 @@ is returned, in which case writes the error message into .Fa errbuf . .Pp +.Rv -std kvm_close +.Sh ERRORS The .Fn kvm_close -function returns 0 on success and -1 on failure. +function may fail and set the global variable +.Va errno +for any of the errors specified for +.Xr close 2 . +.Pp +The +.Fn kvm_close +function may also fail and set +.Va errno +if: +.Bl -tag -width Er +.It Bq Er EINVAL +The value passed via +.Fa kd +was +.Dv NULL . +.El .Sh SEE ALSO +.Xr close 2 , .Xr open 2 , .Xr kvm 3 , .Xr kvm_getargv 3 , From owner-svn-src-stable-10@freebsd.org Tue Mar 28 06:05:27 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8AA77D21D61; Tue, 28 Mar 2017 06:05:27 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 41C347E1; Tue, 28 Mar 2017 06:05:27 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2S65QGA006857; Tue, 28 Mar 2017 06:05:26 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2S65QWU006855; Tue, 28 Mar 2017 06:05:26 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201703280605.v2S65QWU006855@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 28 Mar 2017 06:05:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r316072 - stable/10/lib/libkvm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Mar 2017 06:05:27 -0000 Author: ngie Date: Tue Mar 28 06:05:26 2017 New Revision: 316072 URL: https://svnweb.freebsd.org/changeset/base/316072 Log: MFC r315686,r315688: r315686: kvm_geterr: handle `kd` == NULL in a deterministic/graceful manner Return a NUL string instead of just working by accident with kvm_geterr(3) when MALLOC_PRODUCTION is disabled (I didn't confirm the MALLOC_PRODUCTION being enabled path). Document the new explicit return behavior for kvm_geterr(3), as well as the previous implicit behavior, i.e., the buffer attached to returned via kvm_geterr(3) would be empty if a previous error hadn't been stored in `kd`. r315688: kvm_write: fix -Wcast-qual warning in pointer arithmetic argument Cast buf to `const char *` when doing arithmetic operation to match `cp`'s type [1]. Modified: stable/10/lib/libkvm/kvm.c stable/10/lib/libkvm/kvm_geterr.3 Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libkvm/kvm.c ============================================================================== --- stable/10/lib/libkvm/kvm.c Tue Mar 28 06:03:43 2017 (r316071) +++ stable/10/lib/libkvm/kvm.c Tue Mar 28 06:05:26 2017 (r316072) @@ -76,9 +76,14 @@ static char sccsid[] = "@(#)kvm.c 8.2 (B /* from src/lib/libc/gen/nlist.c */ int __fdnlist(int, struct nlist *); +static char _kd_is_null[] = ""; + char * kvm_geterr(kvm_t *kd) { + + if (kd == NULL) + return (_kd_is_null); return (kd->errbuf); } @@ -623,5 +628,5 @@ kvm_write(kvm_t *kd, u_long kva, const v len -= cw; } - return (cp - (char *)buf); + return (cp - (const char *)buf); } Modified: stable/10/lib/libkvm/kvm_geterr.3 ============================================================================== --- stable/10/lib/libkvm/kvm_geterr.3 Tue Mar 28 06:03:43 2017 (r316071) +++ stable/10/lib/libkvm/kvm_geterr.3 Tue Mar 28 06:05:26 2017 (r316072) @@ -32,7 +32,7 @@ .\" @(#)kvm_geterr.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd June 4, 1993 +.Dd March 21, 2017 .Dt KVM_GETERR 3 .Os .Sh NAME @@ -54,6 +54,15 @@ library call did not produce an error. The string returned is stored in memory owned by .Xr kvm 3 so the message should be copied out and saved elsewhere if necessary. +.Sh RETURN VALUES +The function +.Fn kvm_geterr +will return "" if +.Fa kd +is +.Dv NULL +or an error has not been captured for +.Fa kd . .Sh SEE ALSO .Xr kvm 3 , .Xr kvm_close 3 , From owner-svn-src-stable-10@freebsd.org Tue Mar 28 06:13:17 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9B9BAD21341; Tue, 28 Mar 2017 06:13:17 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5ADECE87; Tue, 28 Mar 2017 06:13:17 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2S6DGiG010980; Tue, 28 Mar 2017 06:13:16 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2S6DG5f010977; Tue, 28 Mar 2017 06:13:16 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201703280613.v2S6DG5f010977@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 28 Mar 2017 06:13:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r316074 - in stable/10: lib/libutil share/man/man9 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Mar 2017 06:13:17 -0000 Author: ngie Date: Tue Mar 28 06:13:16 2017 New Revision: 316074 URL: https://svnweb.freebsd.org/changeset/base/316074 Log: MFC r313436,r313437,r313438,r314587,r315687: r313436: Clarify #includes for hexdump(3) vs sbuf_hexdump(9) hexdump(3) only requires libutil.h, whereas sbuf_hexdump(9) requires sys/types.h (for ssize_t) and sys/sbuf.h r313437: Create link from hexdump(3) to sbuf_hexdump(9) as the manpage describes sbuf_hexdump(9)'s behavior r313438: Clean up trailing and leading whitespace for variables to make it consistent with the rest of the file and style.Makefile(9) a bit more r314587: Correct MLINKS for sbuf_hexdump(9) sbuf_hexdump(9) should be linked to sbuf(9), not hexdump(3). Another review will be posted to deduplicate the sbuf_hexdump reference in in hexdump(3) or at the very least make the information less duplicative. r315687: Document sbuf_hexdump(9) in just sbuf(9) - Remove duplicate references to sbuf_hexdump(9) from hexdump(3). sbuf_hexdump(9) already pointed back to hexdump(3) for implementation details. - Refer to sbuf_hexdump(9) instead of sbuf(9) for completeness Modified: stable/10/lib/libutil/hexdump.3 stable/10/share/man/man9/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libutil/hexdump.3 ============================================================================== --- stable/10/lib/libutil/hexdump.3 Tue Mar 28 06:07:59 2017 (r316073) +++ stable/10/lib/libutil/hexdump.3 Tue Mar 28 06:13:16 2017 (r316074) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 8, 2014 +.Dd March 21, 2017 .Dt HEXDUMP 3 .Os .Sh NAME @@ -36,17 +36,8 @@ .Nd "dump a block of bytes to standard out in hexadecimal form" .Sh SYNOPSIS .In libutil.h -.In sys/sbuf.h .Ft void .Fn hexdump "void *ptr" "int length" "const char *hdr" "int flags" -.Ft void -.Fo sbuf_hexdump -.Fa "struct sbuf *sb" -.Fa "void *ptr" -.Fa "int length" -.Fa "const char *hdr" -.Fa "int flags" -.Fc .Sh DESCRIPTION The .Fn hexdump @@ -59,11 +50,6 @@ output will start with an offset count, followed by 16 .Tn ASCII characters. -.Pp -The -.Fn sbuf_hexdump -function prints the hexdump to the supplied -.Xr sbuf 9 . .Bl -tag -width indent .It Fa ptr Pointer to the array of bytes to print. @@ -103,7 +89,7 @@ Do not print the character values on eac .El .Sh SEE ALSO .Xr ascii 7 , -.Xr sbuf 9 +.Xr sbuf_hexdump 9 .Sh AUTHORS This manual page was written by .An Scott Long . Modified: stable/10/share/man/man9/Makefile ============================================================================== --- stable/10/share/man/man9/Makefile Tue Mar 28 06:07:59 2017 (r316073) +++ stable/10/share/man/man9/Makefile Tue Mar 28 06:13:16 2017 (r316074) @@ -1156,6 +1156,7 @@ MLINKS+=sbuf.9 sbuf_bcat.9 \ sbuf.9 sbuf_done.9 \ sbuf.9 sbuf_error.9 \ sbuf.9 sbuf_finish.9 \ + sbuf.9 sbuf_hexdump.9 \ sbuf.9 sbuf_len.9 \ sbuf.9 sbuf_new.9 \ sbuf.9 sbuf_new_for_sysctl.9 \ From owner-svn-src-stable-10@freebsd.org Tue Mar 28 10:15:31 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EF70CD1F791; Tue, 28 Mar 2017 10:15:31 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A6645C61; Tue, 28 Mar 2017 10:15:31 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2SAFUUD014027; Tue, 28 Mar 2017 10:15:30 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2SAFUg0014025; Tue, 28 Mar 2017 10:15:30 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201703281015.v2SAFUg0014025@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 28 Mar 2017 10:15:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r316085 - stable/10/sys/dev/isp X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Mar 2017 10:15:32 -0000 Author: mav Date: Tue Mar 28 10:15:30 2017 New Revision: 316085 URL: https://svnweb.freebsd.org/changeset/base/316085 Log: MFC r299849 (by trasz): Remove NULL checks after M_WAITOK allocations from isp(4). Modified: stable/10/sys/dev/isp/isp_pci.c stable/10/sys/dev/isp/isp_sbus.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/isp/isp_pci.c ============================================================================== --- stable/10/sys/dev/isp/isp_pci.c Tue Mar 28 10:11:00 2017 (r316084) +++ stable/10/sys/dev/isp/isp_pci.c Tue Mar 28 10:15:30 2017 (r316085) @@ -1600,11 +1600,6 @@ isp_pci_mbxdma(ispsoftc_t *isp) len = isp->isp_maxcmds * sizeof (struct isp_pcmd); isp->isp_osinfo.pcmd_pool = (struct isp_pcmd *) malloc(len, M_DEVBUF, M_WAITOK | M_ZERO); - if (isp->isp_osinfo.pcmd_pool == NULL) { - isp_prt(isp, ISP_LOGERR, "cannot allocate pcmds"); - ISP_LOCK(isp); - return (1); - } if (isp->isp_osinfo.sixtyfourbit) { nsegs = ISP_NSEG64_MAX; @@ -1621,12 +1616,6 @@ isp_pci_mbxdma(ispsoftc_t *isp) len = sizeof (isp_hdl_t) * isp->isp_maxcmds; isp->isp_xflist = (isp_hdl_t *) malloc(len, M_DEVBUF, M_WAITOK | M_ZERO); - if (isp->isp_xflist == NULL) { - free(isp->isp_osinfo.pcmd_pool, M_DEVBUF); - ISP_LOCK(isp); - isp_prt(isp, ISP_LOGERR, "cannot alloc xflist array"); - return (1); - } for (len = 0; len < isp->isp_maxcmds - 1; len++) { isp->isp_xflist[len].cmd = &isp->isp_xflist[len+1]; } Modified: stable/10/sys/dev/isp/isp_sbus.c ============================================================================== --- stable/10/sys/dev/isp/isp_sbus.c Tue Mar 28 10:11:00 2017 (r316084) +++ stable/10/sys/dev/isp/isp_sbus.c Tue Mar 28 10:15:30 2017 (r316085) @@ -448,19 +448,8 @@ isp_sbus_mbxdma(ispsoftc_t *isp) len = sizeof (struct isp_pcmd) * isp->isp_maxcmds; isp->isp_osinfo.pcmd_pool = (struct isp_pcmd *) malloc(len, M_DEVBUF, M_WAITOK | M_ZERO); - if (isp->isp_osinfo.pcmd_pool == NULL) { - isp_prt(isp, ISP_LOGERR, "cannot alloc pcmd pool"); - ISP_LOCK(isp); - return (1); - } - len = sizeof (isp_hdl_t *) * isp->isp_maxcmds; isp->isp_xflist = (isp_hdl_t *) malloc(len, M_DEVBUF, M_WAITOK | M_ZERO); - if (isp->isp_xflist == NULL) { - isp_prt(isp, ISP_LOGERR, "cannot alloc xflist array"); - ISP_LOCK(isp); - return (1); - } for (len = 0; len < isp->isp_maxcmds - 1; len++) { isp->isp_xflist[len].cmd = &isp->isp_xflist[len+1]; } From owner-svn-src-stable-10@freebsd.org Tue Mar 28 10:19:53 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7860ED1F94F; Tue, 28 Mar 2017 10:19:53 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 53027FA0; Tue, 28 Mar 2017 10:19:53 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2SAJq7N014451; Tue, 28 Mar 2017 10:19:52 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2SAJqiW014450; Tue, 28 Mar 2017 10:19:52 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201703281019.v2SAJqiW014450@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 28 Mar 2017 10:19:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r316086 - stable/10 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Mar 2017 10:19:53 -0000 Author: mav Date: Tue Mar 28 10:19:52 2017 New Revision: 316086 URL: https://svnweb.freebsd.org/changeset/base/316086 Log: MFC r313568 (by ken): Change the isp(4) driver to not adjust the tag type for REQUEST SENSE. The isp(4) driver was changing the tag type for REQUEST SENSE commands to Head of Queue, when the CAM CCB flag CAM_TAG_ACTION_VALID was NOT set. CAM_TAG_ACTION_VALID is set when the tag action in the XPT_SCSI_IO is not CAM_TAG_ACTION_NONE and when the target has tagged queueing turned on. In most cases when CAM_TAG_ACTION_VALID is not set, it is because the target is not doing tagged queueing. In those cases, trying to send a Head of Queue tag may cause problems. Instead, default to sending a simple tag. IBM tape drives claim to support tagged queueing in their standard Inquiry data, but have the DQue bit set in the control mode page (mode page 10). CAM correctly detects that these drives do not support tagged queueing, and clears the CAM_TAG_ACTION_VALID flag on CCBs sent down to the drives. This caused the isp(4) driver to go down the path of setting the tag action to a default value, and for Request Sense commands only, set the tag action to Head of Queue. If an IBM tape drive does get a Head of Queue tag, it rejects it with Invalid Message Error (0x49,0x00). (The Qlogic firmware translates that to a Transport Error, which the driver translates to an Unrecoverable HBA Error, or CAM_UNREC_HBA_ERROR.) So, by default, it wasn't possible to get a good response from a REQUEST SENSE to an FC-attached IBM tape drive with the isp(4) driver. IBM tape drives (tested on an LTO-5 with G9N1 firmware and a TS1150 with 4470 firmware) also have a bug in that sending a command with a non-simple tag attribute breaks the tape drive's Command Reference Number (CRN) accounting and causes it to ignore all subsequent commands because it and the initiator disagree about the next expected CRN. The drives do reject the initial command with a head of queue tag with an Invalid Message Error (0x49,0x00), but after that they ignore any subsequent commands. IBM confirmed that it is a bug, and sent me test firmware that fixes the bug. However tape drives in the field will still exhibit the bug until they are upgraded. Request Sense is not often sent to targets because most errors are reported automatically through autosense in Fibre Channel and other modern transports. ("Modern" meaning post SCSI-2.) So this is not an error that would crop up frequently. But Request Sense is useful on tape devices to report status information, aside from error reporting. This problem is less serious without FC-Tape features turned on, specifically precise delivery of commands (which enables Command Reference Numbers), enabled on the target and initiator. Without FC-Tape features turned on, the target would return an error and things would continue on. And it also does not cause problems for targets that do tagged queueing, because in those cases the isp(4) driver just uses the tag type that is specified in the CCB, assuming the CAM_TAG_ACTION_VALID flag is set, and defaults to sending a Simple tag action if it isn't an ordered or head of queue tag. sys/dev/isp/isp.c: In isp_start(), don't try to send Request Sense commands with the Head of Queue tag attribute if the CCB doesn't have a valid tag action. The tag action likely isn't valid because the target doesn't support tagged queueing. Modified: Directory Properties: stable/10/ (props changed) From owner-svn-src-stable-10@freebsd.org Tue Mar 28 10:22:57 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 316D2D1FBE8; Tue, 28 Mar 2017 10:22:57 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EE05880A; Tue, 28 Mar 2017 10:22:56 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2SAMuHY018173; Tue, 28 Mar 2017 10:22:56 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2SAMted018166; Tue, 28 Mar 2017 10:22:55 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201703281022.v2SAMted018166@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 28 Mar 2017 10:22:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r316087 - stable/10/sys/dev/isp X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Mar 2017 10:22:57 -0000 Author: mav Date: Tue Mar 28 10:22:55 2017 New Revision: 316087 URL: https://svnweb.freebsd.org/changeset/base/316087 Log: MFC r315234: Improvements around attach, reset and detach. This change fixes DMA resource leak on driver unload. Also it removes DMA resources allocation for hardcoded number of requests before fetching the real number from firmware. Also it prepares ground for more flexible IRQs allocation according to firmware capabilities. Modified: stable/10/sys/dev/isp/isp.c stable/10/sys/dev/isp/isp_freebsd.c stable/10/sys/dev/isp/isp_freebsd.h stable/10/sys/dev/isp/isp_library.c stable/10/sys/dev/isp/isp_library.h stable/10/sys/dev/isp/isp_pci.c stable/10/sys/dev/isp/isp_sbus.c stable/10/sys/dev/isp/ispvar.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/isp/isp.c ============================================================================== --- stable/10/sys/dev/isp/isp.c Tue Mar 28 10:19:52 2017 (r316086) +++ stable/10/sys/dev/isp/isp.c Tue Mar 28 10:22:55 2017 (r316087) @@ -178,13 +178,6 @@ isp_reset(ispsoftc_t *isp, int do_load_d const char *btype = "????"; static const char dcrc[] = "Downloaded RISC Code Checksum Failure"; - isp->isp_state = ISP_NILSTATE; - if (isp->isp_dead) { - isp_shutdown(isp); - ISP_DISABLE_INTS(isp); - return; - } - /* * Basic types (SCSI, FibreChannel and PCI or SBus) * have been set in the MD code. We figure out more @@ -195,56 +188,10 @@ isp_reset(ispsoftc_t *isp, int do_load_d * for SCSI adapters and do other settings for the 2100. */ + isp->isp_state = ISP_NILSTATE; ISP_DISABLE_INTS(isp); /* - * Pick an initial maxcmds value which will be used - * to allocate xflist pointer space. It may be changed - * later by the firmware. - */ - if (IS_24XX(isp)) { - isp->isp_maxcmds = 4096; - } else if (IS_2322(isp)) { - isp->isp_maxcmds = 2048; - } else if (IS_23XX(isp) || IS_2200(isp)) { - isp->isp_maxcmds = 1024; - } else { - isp->isp_maxcmds = 512; - } - - /* - * Set up DMA for the request and response queues. - * - * We do this now so we can use the request queue - * for dma to load firmware from. - */ - if (ISP_MBOXDMASETUP(isp) != 0) { - isp_prt(isp, ISP_LOGERR, "Cannot setup DMA"); - return; - } - - /* - * Set up default request/response queue in-pointer/out-pointer - * register indices. - */ - if (IS_24XX(isp)) { - isp->isp_rqstinrp = BIU2400_REQINP; - isp->isp_rqstoutrp = BIU2400_REQOUTP; - isp->isp_respinrp = BIU2400_RSPINP; - isp->isp_respoutrp = BIU2400_RSPOUTP; - } else if (IS_23XX(isp)) { - isp->isp_rqstinrp = BIU_REQINP; - isp->isp_rqstoutrp = BIU_REQOUTP; - isp->isp_respinrp = BIU_RSPINP; - isp->isp_respoutrp = BIU_RSPOUTP; - } else { - isp->isp_rqstinrp = INMAILBOX4; - isp->isp_rqstoutrp = OUTMAILBOX4; - isp->isp_respinrp = OUTMAILBOX5; - isp->isp_respoutrp = INMAILBOX5; - } - - /* * Put the board into PAUSE mode (so we can read the SXP registers * or write FPM/FBM registers). */ @@ -468,7 +415,6 @@ isp_reset(ispsoftc_t *isp, int do_load_d isp->isp_clock = isp->isp_mdvec->dv_clock; } } - } /* @@ -477,11 +423,6 @@ isp_reset(ispsoftc_t *isp, int do_load_d isp->isp_intcnt = isp->isp_intbogus = 0; /* - * Do MD specific pre initialization - */ - ISP_RESET0(isp); - - /* * Hit the chip over the head with hammer, * and give it a chance to recover. */ @@ -513,7 +454,6 @@ isp_reset(ispsoftc_t *isp, int do_load_d } } if (val & BIU2400_DMA_ACTIVE) { - ISP_RESET0(isp); isp_prt(isp, ISP_LOGERR, "DMA Failed to Stop on Reset"); return; } @@ -533,7 +473,6 @@ isp_reset(ispsoftc_t *isp, int do_load_d } } if (val & BIU2400_SOFT_RESET) { - ISP_RESET0(isp); isp_prt(isp, ISP_LOGERR, "Failed to come out of reset"); return; } @@ -572,7 +511,6 @@ isp_reset(ispsoftc_t *isp, int do_load_d ISP_DELAY(100); if (--loops < 0) { ISP_DUMPREGS(isp, "chip reset timed out"); - ISP_RESET0(isp); return; } } @@ -613,7 +551,6 @@ isp_reset(ispsoftc_t *isp, int do_load_d } } if (val != 0) { - ISP_RESET0(isp); isp_prt(isp, ISP_LOGERR, "reset didn't clear"); return; } @@ -655,6 +592,26 @@ isp_reset(ispsoftc_t *isp, int do_load_d ISP_WRITE(isp, HCCR, HCCR_CMD_RELEASE); } + /* + * Set up default request/response queue in-pointer/out-pointer + * register indices. + */ + if (IS_24XX(isp)) { + isp->isp_rqstinrp = BIU2400_REQINP; + isp->isp_rqstoutrp = BIU2400_REQOUTP; + isp->isp_respinrp = BIU2400_RSPINP; + isp->isp_respoutrp = BIU2400_RSPOUTP; + } else if (IS_23XX(isp)) { + isp->isp_rqstinrp = BIU_REQINP; + isp->isp_rqstoutrp = BIU_REQOUTP; + isp->isp_respinrp = BIU_RSPINP; + isp->isp_respoutrp = BIU_RSPOUTP; + } else { + isp->isp_rqstinrp = INMAILBOX4; + isp->isp_rqstoutrp = OUTMAILBOX4; + isp->isp_respinrp = OUTMAILBOX5; + isp->isp_respoutrp = INMAILBOX5; + } ISP_WRITE(isp, isp->isp_rqstinrp, 0); ISP_WRITE(isp, isp->isp_rqstoutrp, 0); ISP_WRITE(isp, isp->isp_respinrp, 0); @@ -668,10 +625,10 @@ isp_reset(ispsoftc_t *isp, int do_load_d ISP_WRITE(isp, BIU2400_ATIO_RSPOUTP, 0); } - /* - * Do MD specific post initialization - */ - ISP_RESET1(isp); + if (!IS_24XX(isp) && isp->isp_bustype == ISP_BT_PCI) { + /* Make sure the BIOS is disabled */ + ISP_WRITE(isp, HCCR, PCI_HCCR_CMD_BIOS); + } /* * Wait for everything to finish firing up. @@ -686,7 +643,6 @@ isp_reset(ispsoftc_t *isp, int do_load_d while (ISP_READ(isp, OUTMAILBOX0) == MBOX_BUSY) { ISP_DELAY(100); if (--loops < 0) { - ISP_RESET0(isp); isp_prt(isp, ISP_LOGERR, "MBOX_BUSY never cleared on reset"); return; } @@ -707,14 +663,12 @@ isp_reset(ispsoftc_t *isp, int do_load_d isp_mboxcmd(isp, &mbs); if (mbs.param[0] != MBOX_COMMAND_COMPLETE) { isp_prt(isp, ISP_LOGERR, "NOP command failed (%x)", mbs.param[0]); - ISP_RESET0(isp); return; } /* * Do some operational tests */ - if (IS_SCSI(isp) || IS_24XX(isp)) { static const uint16_t patterns[MAX_MAILBOX] = { 0x0000, 0xdead, 0xbeef, 0xffff, @@ -735,12 +689,10 @@ isp_reset(ispsoftc_t *isp, int do_load_d } isp_mboxcmd(isp, &mbs); if (mbs.param[0] != MBOX_COMMAND_COMPLETE) { - ISP_RESET0(isp); return; } for (i = 1; i < nmbox; i++) { if (mbs.param[i] != patterns[i]) { - ISP_RESET0(isp); isp_prt(isp, ISP_LOGERR, "Register Test Failed at Register %d: should have 0x%04x but got 0x%04x", i, patterns[i], mbs.param[i]); return; } @@ -758,6 +710,17 @@ isp_reset(ispsoftc_t *isp, int do_load_d */ if ((isp->isp_mdvec->dv_ispfw == NULL) || (isp->isp_confopts & ISP_CFG_NORELOAD)) { dodnld = 0; + } else { + + /* + * Set up DMA for the request and response queues. + * We do this now so we can use the request queue + * for dma to load firmware from. + */ + if (ISP_MBOXDMASETUP(isp) != 0) { + isp_prt(isp, ISP_LOGERR, "Cannot setup DMA"); + return; + } } if (IS_24XX(isp)) { @@ -849,7 +812,6 @@ isp_reset(ispsoftc_t *isp, int do_load_d goto again; } isp_prt(isp, ISP_LOGERR, "F/W Risc Ram Load Failed"); - ISP_RESET0(isp); return; } la += nw; @@ -918,7 +880,6 @@ isp_reset(ispsoftc_t *isp, int do_load_d isp_mboxcmd(isp, &mbs); if (mbs.param[0] != MBOX_COMMAND_COMPLETE) { isp_prt(isp, ISP_LOGERR, "F/W Risc Ram Load Failed"); - ISP_RESET0(isp); return; } la += nw; @@ -961,7 +922,6 @@ isp_reset(ispsoftc_t *isp, int do_load_d isp_mboxcmd(isp, &mbs); if (mbs.param[0] != MBOX_COMMAND_COMPLETE) { isp_prt(isp, ISP_LOGERR, "F/W download failed at word %d", isp->isp_mbxwrk1 - code_org); - ISP_RESET0(isp); return; } } else if (IS_26XX(isp)) { @@ -971,7 +931,6 @@ isp_reset(ispsoftc_t *isp, int do_load_d isp_mboxcmd(isp, &mbs); if (mbs.param[0] != MBOX_COMMAND_COMPLETE) { isp_prt(isp, ISP_LOGERR, "Flash F/W load failed"); - ISP_RESET0(isp); return; } } else { @@ -992,7 +951,6 @@ isp_reset(ispsoftc_t *isp, int do_load_d isp_mboxcmd(isp, &mbs); if (mbs.param[0] != MBOX_COMMAND_COMPLETE) { isp_prt(isp, ISP_LOGERR, dcrc); - ISP_RESET0(isp); return; } } @@ -1003,8 +961,6 @@ isp_reset(ispsoftc_t *isp, int do_load_d * If we didn't actually download f/w, * we still need to (re)start it. */ - - MBSINIT(&mbs, MBOX_EXEC_FIRMWARE, MBLOGALL, 5000000); if (IS_24XX(isp)) { mbs.param[1] = code_org >> 16; @@ -1027,7 +983,6 @@ isp_reset(ispsoftc_t *isp, int do_load_d isp_mboxcmd(isp, &mbs); if (IS_2322(isp) || IS_24XX(isp)) { if (mbs.param[0] != MBOX_COMMAND_COMPLETE) { - ISP_RESET0(isp); return; } } @@ -1051,7 +1006,6 @@ isp_reset(ispsoftc_t *isp, int do_load_d MBSINIT(&mbs, MBOX_ABOUT_FIRMWARE, MBLOGALL, 0); isp_mboxcmd(isp, &mbs); if (mbs.param[0] != MBOX_COMMAND_COMPLETE) { - ISP_RESET0(isp); return; } @@ -1249,22 +1203,16 @@ isp_reset(ispsoftc_t *isp, int do_load_d MBSINIT(&mbs, MBOX_GET_RESOURCE_COUNT, MBLOGALL, 0); isp_mboxcmd(isp, &mbs); if (mbs.param[0] != MBOX_COMMAND_COMPLETE) { - ISP_RESET0(isp); return; } - if (isp->isp_maxcmds >= mbs.param[3]) { - isp->isp_maxcmds = mbs.param[3]; - } + isp->isp_maxcmds = mbs.param[3]; } else { MBSINIT(&mbs, MBOX_GET_FIRMWARE_STATUS, MBLOGALL, 0); isp_mboxcmd(isp, &mbs); if (mbs.param[0] != MBOX_COMMAND_COMPLETE) { - ISP_RESET0(isp); return; } - if (isp->isp_maxcmds >= mbs.param[2]) { - isp->isp_maxcmds = mbs.param[2]; - } + isp->isp_maxcmds = mbs.param[2]; } isp_prt(isp, ISP_LOGCONFIG, "%d max I/O command limit set", isp->isp_maxcmds); @@ -1284,15 +1232,28 @@ isp_reset(ispsoftc_t *isp, int do_load_d isp->isp_nchan = 1; } } + + /* + * Final DMA setup after we got isp_maxcmds. + */ + if (ISP_MBOXDMASETUP(isp) != 0) { + isp_prt(isp, ISP_LOGERR, "Cannot setup DMA"); + return; + } + + /* + * Setup interrupts. + */ + if (ISP_IRQSETUP(isp) != 0) { + isp_prt(isp, ISP_LOGERR, "Cannot setup IRQ"); + return; + } + ISP_ENABLE_INTS(isp); + if (IS_FC(isp)) { for (i = 0; i < isp->isp_nchan; i++) isp_change_fw_state(isp, i, FW_CONFIG_WAIT); } - if (isp->isp_dead) { - isp_shutdown(isp); - ISP_DISABLE_INTS(isp); - return; - } isp->isp_state = ISP_RESETSTATE; @@ -1303,7 +1264,7 @@ isp_reset(ispsoftc_t *isp, int do_load_d * of knowing how many luns we support. * * Expanded lun firmware gives you 32 luns for SCSI cards and - * 16384 luns for Fibre Channel cards. + * unlimited luns for Fibre Channel cards. * * It turns out that even for QLogic 2100s with ROM 1.10 and above * we do get a firmware attributes word returned in mailbox register 6. @@ -1351,7 +1312,7 @@ isp_reset(ispsoftc_t *isp, int do_load_d * Clean firmware shutdown. */ static int -isp_deinit(ispsoftc_t *isp) +isp_stop(ispsoftc_t *isp) { mbreg_t mbs; @@ -1370,6 +1331,35 @@ isp_deinit(ispsoftc_t *isp) } /* + * Hardware shutdown. + */ +void +isp_shutdown(ispsoftc_t *isp) +{ + + if (isp->isp_state >= ISP_RESETSTATE) + isp_stop(isp); + ISP_DISABLE_INTS(isp); + if (IS_FC(isp)) { + if (IS_24XX(isp)) { + ISP_WRITE(isp, BIU2400_ICR, 0); + ISP_WRITE(isp, BIU2400_HCCR, HCCR_2400_CMD_PAUSE); + } else { + ISP_WRITE(isp, BIU_ICR, 0); + ISP_WRITE(isp, HCCR, HCCR_CMD_PAUSE); + ISP_WRITE(isp, BIU2100_CSR, BIU2100_FPM0_REGS); + ISP_WRITE(isp, FPM_DIAG_CONFIG, FPM_SOFT_RESET); + ISP_WRITE(isp, BIU2100_CSR, BIU2100_FB_REGS); + ISP_WRITE(isp, FBM_CMD, FBMCMD_FIFO_RESET_ALL); + ISP_WRITE(isp, BIU2100_CSR, BIU2100_RISC_REGS); + } + } else { + ISP_WRITE(isp, BIU_ICR, 0); + ISP_WRITE(isp, HCCR, HCCR_CMD_PAUSE); + } +} + +/* * Initialize Parameters of Hardware to a known state. * * Locks are held before coming here. @@ -5599,7 +5589,6 @@ isp_parse_async(ispsoftc_t *isp, uint16_ isp_async(isp, ISPASYNC_BUS_RESET, chan); break; case ASYNC_SYSTEM_ERROR: - isp->isp_dead = 1; isp->isp_state = ISP_CRASHED; /* * Were we waiting for a mailbox command to complete? @@ -5770,7 +5759,6 @@ isp_parse_async_fc(ispsoftc_t *isp, uint switch (mbox) { case ASYNC_SYSTEM_ERROR: - isp->isp_dead = 1; isp->isp_state = ISP_CRASHED; FCPARAM(isp, chan)->isp_loopstate = LOOP_NIL; isp_change_fw_state(isp, chan, FW_CONFIG_WAIT); @@ -6052,7 +6040,6 @@ isp_parse_async_fc(ispsoftc_t *isp, uint "Point-to-Point -> Loop mode (BAD LIP)"); break; case ISP_CONN_FATAL: - isp->isp_dead = 1; isp->isp_state = ISP_CRASHED; isp_prt(isp, ISP_LOGERR, "FATAL CONNECTION ERROR"); isp_async(isp, ISPASYNC_FW_CRASH); @@ -7895,14 +7882,13 @@ isp_reinit(ispsoftc_t *isp, int do_load_ { int i, res = 0; - if (isp->isp_state == ISP_RUNSTATE) - isp_deinit(isp); + if (isp->isp_state > ISP_RESETSTATE) + isp_stop(isp); if (isp->isp_state != ISP_RESETSTATE) isp_reset(isp, do_load_defaults); if (isp->isp_state != ISP_RESETSTATE) { res = EIO; isp_prt(isp, ISP_LOGERR, "%s: cannot reset card", __func__); - ISP_DISABLE_INTS(isp); goto cleanup; } Modified: stable/10/sys/dev/isp/isp_freebsd.c ============================================================================== --- stable/10/sys/dev/isp/isp_freebsd.c Tue Mar 28 10:19:52 2017 (r316086) +++ stable/10/sys/dev/isp/isp_freebsd.c Tue Mar 28 10:22:55 2017 (r316087) @@ -1529,7 +1529,7 @@ isp_target_start_ctio(ispsoftc_t *isp, u isp_prt(isp, ISP_LOGTDEBUG0, "%s: ests base %p vaddr %p ecmd_dma %jx addr %jx len %u", __func__, isp->isp_osinfo.ecmd_base, atp->ests, (uintmax_t) isp->isp_osinfo.ecmd_dma, (uintmax_t)addr, MIN_FCP_RESPONSE_SIZE + sense_length); cto->rsp.m2.ct_datalen = MIN_FCP_RESPONSE_SIZE + sense_length; - if (isp->isp_osinfo.sixtyfourbit) { + if (cto->ct_header.rqs_entry_type == RQSTYPE_CTIO3) { cto->rsp.m2.u.ct_fcp_rsp_iudata_64.ds_base = DMA_LO32(addr); cto->rsp.m2.u.ct_fcp_rsp_iudata_64.ds_basehi = DMA_HI32(addr); cto->rsp.m2.u.ct_fcp_rsp_iudata_64.ds_count = MIN_FCP_RESPONSE_SIZE + sense_length; @@ -4303,21 +4303,6 @@ changed: } } - -/* - * Locks are held before coming here. - */ -void -isp_uninit(ispsoftc_t *isp) -{ - if (IS_24XX(isp)) { - ISP_WRITE(isp, BIU2400_HCCR, HCCR_2400_CMD_RESET); - } else { - ISP_WRITE(isp, HCCR, HCCR_CMD_RESET); - } - ISP_DISABLE_INTS(isp); -} - uint64_t isp_default_wwn(ispsoftc_t * isp, int chan, int isactive, int iswwnn) { Modified: stable/10/sys/dev/isp/isp_freebsd.h ============================================================================== --- stable/10/sys/dev/isp/isp_freebsd.h Tue Mar 28 10:19:52 2017 (r316086) +++ stable/10/sys/dev/isp/isp_freebsd.h Tue Mar 28 10:22:55 2017 (r316087) @@ -697,7 +697,6 @@ default: \ */ extern int isp_attach(ispsoftc_t *); extern int isp_detach(ispsoftc_t *); -extern void isp_uninit(ispsoftc_t *); extern uint64_t isp_default_wwn(ispsoftc_t *, int, int, int); /* Modified: stable/10/sys/dev/isp/isp_library.c ============================================================================== --- stable/10/sys/dev/isp/isp_library.c Tue Mar 28 10:19:52 2017 (r316086) +++ stable/10/sys/dev/isp/isp_library.c Tue Mar 28 10:22:55 2017 (r316087) @@ -632,28 +632,6 @@ isp_clear_commands(ispsoftc_t *isp) #endif } -void -isp_shutdown(ispsoftc_t *isp) -{ - if (IS_FC(isp)) { - if (IS_24XX(isp)) { - ISP_WRITE(isp, BIU2400_ICR, 0); - ISP_WRITE(isp, BIU2400_HCCR, HCCR_2400_CMD_PAUSE); - } else { - ISP_WRITE(isp, BIU_ICR, 0); - ISP_WRITE(isp, HCCR, HCCR_CMD_PAUSE); - ISP_WRITE(isp, BIU2100_CSR, BIU2100_FPM0_REGS); - ISP_WRITE(isp, FPM_DIAG_CONFIG, FPM_SOFT_RESET); - ISP_WRITE(isp, BIU2100_CSR, BIU2100_FB_REGS); - ISP_WRITE(isp, FBM_CMD, FBMCMD_FIFO_RESET_ALL); - ISP_WRITE(isp, BIU2100_CSR, BIU2100_RISC_REGS); - } - } else { - ISP_WRITE(isp, BIU_ICR, 0); - ISP_WRITE(isp, HCCR, HCCR_CMD_PAUSE); - } -} - /* * Functions to move stuff to a form that the QLogic RISC engine understands * and functions to move stuff back to a form the processor understands. Modified: stable/10/sys/dev/isp/isp_library.h ============================================================================== --- stable/10/sys/dev/isp/isp_library.h Tue Mar 28 10:19:52 2017 (r316086) +++ stable/10/sys/dev/isp/isp_library.h Tue Mar 28 10:22:55 2017 (r316087) @@ -77,11 +77,6 @@ const char *isp_fc_toponame(fcparam *); void isp_clear_commands(ispsoftc_t *); /* - * Common chip shutdown function - */ -void isp_shutdown(ispsoftc_t *); - -/* * Put/Get routines to push from CPU view to device view * or to pull from device view to CPU view for various * data structures (IOCB) Modified: stable/10/sys/dev/isp/isp_pci.c ============================================================================== --- stable/10/sys/dev/isp/isp_pci.c Tue Mar 28 10:19:52 2017 (r316086) +++ stable/10/sys/dev/isp/isp_pci.c Tue Mar 28 10:22:55 2017 (r316087) @@ -65,11 +65,9 @@ static int isp_pci_rd_isr(ispsoftc_t *, static int isp_pci_rd_isr_2300(ispsoftc_t *, uint16_t *, uint16_t *, uint16_t *); static int isp_pci_rd_isr_2400(ispsoftc_t *, uint16_t *, uint16_t *, uint16_t *); static int isp_pci_mbxdma(ispsoftc_t *); +static void isp_pci_mbxdmafree(ispsoftc_t *); static int isp_pci_dmasetup(ispsoftc_t *, XS_T *, void *); - - -static void isp_pci_reset0(ispsoftc_t *); -static void isp_pci_reset1(ispsoftc_t *); +static int isp_pci_irqsetup(ispsoftc_t *); static void isp_pci_dumpregs(ispsoftc_t *, const char *); static struct ispmdvec mdvec = { @@ -79,8 +77,7 @@ static struct ispmdvec mdvec = { isp_pci_mbxdma, isp_pci_dmasetup, isp_common_dmateardown, - isp_pci_reset0, - isp_pci_reset1, + isp_pci_irqsetup, isp_pci_dumpregs, NULL, BIU_BURST_ENABLE|BIU_PCI_CONF1_FIFO_64 @@ -93,8 +90,7 @@ static struct ispmdvec mdvec_1080 = { isp_pci_mbxdma, isp_pci_dmasetup, isp_common_dmateardown, - isp_pci_reset0, - isp_pci_reset1, + isp_pci_irqsetup, isp_pci_dumpregs, NULL, BIU_BURST_ENABLE|BIU_PCI_CONF1_FIFO_64 @@ -107,8 +103,7 @@ static struct ispmdvec mdvec_12160 = { isp_pci_mbxdma, isp_pci_dmasetup, isp_common_dmateardown, - isp_pci_reset0, - isp_pci_reset1, + isp_pci_irqsetup, isp_pci_dumpregs, NULL, BIU_BURST_ENABLE|BIU_PCI_CONF1_FIFO_64 @@ -121,8 +116,7 @@ static struct ispmdvec mdvec_2100 = { isp_pci_mbxdma, isp_pci_dmasetup, isp_common_dmateardown, - isp_pci_reset0, - isp_pci_reset1, + isp_pci_irqsetup, isp_pci_dumpregs }; @@ -133,8 +127,7 @@ static struct ispmdvec mdvec_2200 = { isp_pci_mbxdma, isp_pci_dmasetup, isp_common_dmateardown, - isp_pci_reset0, - isp_pci_reset1, + isp_pci_irqsetup, isp_pci_dumpregs }; @@ -145,8 +138,7 @@ static struct ispmdvec mdvec_2300 = { isp_pci_mbxdma, isp_pci_dmasetup, isp_common_dmateardown, - isp_pci_reset0, - isp_pci_reset1, + isp_pci_irqsetup, isp_pci_dumpregs }; @@ -157,8 +149,7 @@ static struct ispmdvec mdvec_2400 = { isp_pci_mbxdma, isp_pci_dmasetup, isp_common_dmateardown, - isp_pci_reset0, - isp_pci_reset1, + isp_pci_irqsetup, NULL }; @@ -169,8 +160,7 @@ static struct ispmdvec mdvec_2500 = { isp_pci_mbxdma, isp_pci_dmasetup, isp_common_dmateardown, - isp_pci_reset0, - isp_pci_reset1, + isp_pci_irqsetup, NULL }; @@ -181,8 +171,7 @@ static struct ispmdvec mdvec_2600 = { isp_pci_mbxdma, isp_pci_dmasetup, isp_common_dmateardown, - isp_pci_reset0, - isp_pci_reset1, + isp_pci_irqsetup, NULL }; @@ -681,26 +670,19 @@ isp_get_specific_options(device_t dev, i static int isp_pci_attach(device_t dev) { - int i, locksetup = 0; + struct isp_pcisoftc *pcs = device_get_softc(dev); + ispsoftc_t *isp = &pcs->pci_isp; + int i; uint32_t data, cmd, linesz, did; - struct isp_pcisoftc *pcs; - ispsoftc_t *isp; size_t psize, xsize; char fwname[32]; - pcs = device_get_softc(dev); - if (pcs == NULL) { - device_printf(dev, "cannot get softc\n"); - return (ENOMEM); - } - memset(pcs, 0, sizeof (*pcs)); - pcs->pci_dev = dev; - isp = &pcs->pci_isp; isp->isp_dev = dev; isp->isp_nchan = 1; if (sizeof (bus_addr_t) > 4) isp->isp_osinfo.sixtyfourbit = 1; + mtx_init(&isp->isp_osinfo.lock, "isp", NULL, MTX_DEF); /* * Get Generic Options @@ -980,10 +962,6 @@ isp_pci_attach(device_t dev) goto bad; } - /* Make sure the lock is set up. */ - mtx_init(&isp->isp_osinfo.lock, "isp", NULL, MTX_DEF); - locksetup++; - if (isp_setup_intr(dev, pcs->irq, ISP_IFLAGS, NULL, isp_platform_intr, isp, &pcs->ih)) { device_printf(dev, "could not setup interrupt\n"); goto bad; @@ -1007,7 +985,7 @@ isp_pci_attach(device_t dev) ISP_UNLOCK(isp); if (isp_attach(isp)) { ISP_LOCK(isp); - isp_uninit(isp); + isp_shutdown(isp); ISP_UNLOCK(isp); goto bad; } @@ -1017,9 +995,6 @@ bad: if (pcs->ih) { (void) bus_teardown_intr(dev, pcs->irq, pcs->ih); } - if (locksetup) { - mtx_destroy(&isp->isp_osinfo.lock); - } if (pcs->irq) { (void) bus_release_resource(dev, SYS_RES_IRQ, pcs->iqd, pcs->irq); } @@ -1040,43 +1015,34 @@ bad: free(pcs->pci_isp.isp_osinfo.pc.ptr, M_DEVBUF); pcs->pci_isp.isp_osinfo.pc.ptr = NULL; } + mtx_destroy(&isp->isp_osinfo.lock); return (ENXIO); } static int isp_pci_detach(device_t dev) { - struct isp_pcisoftc *pcs; - ispsoftc_t *isp; + struct isp_pcisoftc *pcs = device_get_softc(dev); + ispsoftc_t *isp = &pcs->pci_isp; int status; - pcs = device_get_softc(dev); - if (pcs == NULL) { - return (ENXIO); - } - isp = (ispsoftc_t *) pcs; status = isp_detach(isp); if (status) return (status); ISP_LOCK(isp); - isp_uninit(isp); - if (pcs->ih) { - (void) bus_teardown_intr(dev, pcs->irq, pcs->ih); - } + isp_shutdown(isp); ISP_UNLOCK(isp); - mtx_destroy(&isp->isp_osinfo.lock); + if (pcs->ih) + (void) bus_teardown_intr(dev, pcs->irq, pcs->ih); (void) bus_release_resource(dev, SYS_RES_IRQ, pcs->iqd, pcs->irq); - if (pcs->msicount) { + if (pcs->msicount) pci_release_msi(dev); - } (void) bus_release_resource(dev, pcs->rtp, pcs->rgd, pcs->regs); if (pcs->regs1) (void) bus_release_resource(dev, pcs->rtp1, pcs->rgd1, pcs->regs1); if (pcs->regs2) (void) bus_release_resource(dev, pcs->rtp2, pcs->rgd2, pcs->regs2); - /* - * XXX: THERE IS A LOT OF LEAKAGE HERE - */ + isp_pci_mbxdmafree(isp); if (pcs->pci_isp.isp_param) { free(pcs->pci_isp.isp_param, M_DEVBUF); pcs->pci_isp.isp_param = NULL; @@ -1085,6 +1051,7 @@ isp_pci_detach(device_t dev) free(pcs->pci_isp.isp_osinfo.pc.ptr, M_DEVBUF); pcs->pci_isp.isp_osinfo.pc.ptr = NULL; } + mtx_destroy(&isp->isp_osinfo.lock); return (0); } @@ -1571,56 +1538,39 @@ isp_pci_mbxdma(ispsoftc_t *isp) struct imush im; isp_ecmd_t *ecmd; - /* - * Already been here? If so, leave... - */ - if (isp->isp_rquest) { + /* Already been here? If so, leave... */ + if (isp->isp_xflist != NULL) + return (0); + if (isp->isp_rquest != NULL && isp->isp_maxcmds == 0) return (0); - } ISP_UNLOCK(isp); - - if (isp->isp_maxcmds == 0) { - isp_prt(isp, ISP_LOGERR, "maxcmds not set"); - ISP_LOCK(isp); - return (1); - } + if (isp->isp_rquest != NULL) + goto gotmaxcmds; hlim = BUS_SPACE_MAXADDR; if (IS_ULTRA2(isp) || IS_FC(isp) || IS_1240(isp)) { - if (sizeof (bus_size_t) > 4) { + if (sizeof (bus_size_t) > 4) slim = (bus_size_t) (1ULL << 32); - } else { + else slim = (bus_size_t) (1UL << 31); - } llim = BUS_SPACE_MAXADDR; } else { - llim = BUS_SPACE_MAXADDR_32BIT; slim = (1UL << 24); + llim = BUS_SPACE_MAXADDR_32BIT; } - - len = isp->isp_maxcmds * sizeof (struct isp_pcmd); - isp->isp_osinfo.pcmd_pool = (struct isp_pcmd *) malloc(len, M_DEVBUF, M_WAITOK | M_ZERO); - - if (isp->isp_osinfo.sixtyfourbit) { + if (isp->isp_osinfo.sixtyfourbit) nsegs = ISP_NSEG64_MAX; - } else { + else nsegs = ISP_NSEG_MAX; - } - if (isp_dma_tag_create(BUS_DMA_ROOTARG(ISP_PCD(isp)), 1, slim, llim, hlim, NULL, NULL, BUS_SPACE_MAXSIZE, nsegs, slim, 0, &isp->isp_osinfo.dmat)) { - free(isp->isp_osinfo.pcmd_pool, M_DEVBUF); + if (isp_dma_tag_create(BUS_DMA_ROOTARG(ISP_PCD(isp)), 1, + slim, llim, hlim, NULL, NULL, BUS_SPACE_MAXSIZE, nsegs, slim, 0, + &isp->isp_osinfo.dmat)) { ISP_LOCK(isp); isp_prt(isp, ISP_LOGERR, "could not create master dma tag"); return (1); } - len = sizeof (isp_hdl_t) * isp->isp_maxcmds; - isp->isp_xflist = (isp_hdl_t *) malloc(len, M_DEVBUF, M_WAITOK | M_ZERO); - for (len = 0; len < isp->isp_maxcmds - 1; len++) { - isp->isp_xflist[len].cmd = &isp->isp_xflist[len+1]; - } - isp->isp_xffree = isp->isp_xflist; - /* * Allocate and map the request queue and a region for external * DMA addressable command/status structures (22XX and later). @@ -1632,20 +1582,20 @@ isp_pci_mbxdma(ispsoftc_t *isp) BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, len, 1, len, 0, &isp->isp_osinfo.reqdmat)) { isp_prt(isp, ISP_LOGERR, "cannot create request DMA tag"); - goto bad1; + goto bad; } if (bus_dmamem_alloc(isp->isp_osinfo.reqdmat, (void **)&base, BUS_DMA_COHERENT, &isp->isp_osinfo.reqmap) != 0) { isp_prt(isp, ISP_LOGERR, "cannot allocate request DMA memory"); bus_dma_tag_destroy(isp->isp_osinfo.reqdmat); - goto bad1; + goto bad; } isp->isp_rquest = base; im.error = 0; if (bus_dmamap_load(isp->isp_osinfo.reqdmat, isp->isp_osinfo.reqmap, base, len, imc, &im, 0) || im.error) { isp_prt(isp, ISP_LOGERR, "error loading request DMA map %d", im.error); - goto bad1; + goto bad; } isp_prt(isp, ISP_LOGDEBUG0, "request area @ 0x%jx/0x%jx", (uintmax_t)im.maddr, (uintmax_t)len); @@ -1673,20 +1623,20 @@ isp_pci_mbxdma(ispsoftc_t *isp) BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, len, 1, len, 0, &isp->isp_osinfo.respdmat)) { isp_prt(isp, ISP_LOGERR, "cannot create response DMA tag"); - goto bad1; + goto bad; } if (bus_dmamem_alloc(isp->isp_osinfo.respdmat, (void **)&base, BUS_DMA_COHERENT, &isp->isp_osinfo.respmap) != 0) { isp_prt(isp, ISP_LOGERR, "cannot allocate response DMA memory"); bus_dma_tag_destroy(isp->isp_osinfo.respdmat); - goto bad1; + goto bad; } isp->isp_result = base; im.error = 0; if (bus_dmamap_load(isp->isp_osinfo.respdmat, isp->isp_osinfo.respmap, base, len, imc, &im, 0) || im.error) { isp_prt(isp, ISP_LOGERR, "error loading response DMA map %d", im.error); - goto bad1; + goto bad; } isp_prt(isp, ISP_LOGDEBUG0, "response area @ 0x%jx/0x%jx", (uintmax_t)im.maddr, (uintmax_t)len); @@ -1702,13 +1652,13 @@ isp_pci_mbxdma(ispsoftc_t *isp) BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, len, 1, len, 0, &isp->isp_osinfo.atiodmat)) { isp_prt(isp, ISP_LOGERR, "cannot create ATIO DMA tag"); - goto bad1; + goto bad; } if (bus_dmamem_alloc(isp->isp_osinfo.atiodmat, (void **)&base, BUS_DMA_COHERENT, &isp->isp_osinfo.atiomap) != 0) { isp_prt(isp, ISP_LOGERR, "cannot allocate ATIO DMA memory"); bus_dma_tag_destroy(isp->isp_osinfo.atiodmat); - goto bad1; + goto bad; } isp->isp_atioq = base; im.error = 0; @@ -1754,6 +1704,7 @@ isp_pci_mbxdma(ispsoftc_t *isp) base, ISP_FC_SCRLEN, imc, &im, 0) || im.error) { bus_dmamem_free(isp->isp_osinfo.scdmat, base, fc->scmap); + FCPARAM(isp, cmap)->isp_scratch = NULL; goto bad; } FCPARAM(isp, cmap)->isp_scdma = im.maddr; @@ -1775,83 +1726,134 @@ isp_pci_mbxdma(ispsoftc_t *isp) } } + if (isp->isp_maxcmds == 0) { + ISP_LOCK(isp); + return (0); + } + +gotmaxcmds: + len = isp->isp_maxcmds * sizeof (struct isp_pcmd); + isp->isp_osinfo.pcmd_pool = (struct isp_pcmd *) + malloc(len, M_DEVBUF, M_WAITOK | M_ZERO); for (i = 0; i < isp->isp_maxcmds; i++) { struct isp_pcmd *pcmd = &isp->isp_osinfo.pcmd_pool[i]; error = bus_dmamap_create(isp->isp_osinfo.dmat, 0, &pcmd->dmap); if (error) { isp_prt(isp, ISP_LOGERR, "error %d creating per-cmd DMA maps", error); while (--i >= 0) { - bus_dmamap_destroy(isp->isp_osinfo.dmat, isp->isp_osinfo.pcmd_pool[i].dmap); + bus_dmamap_destroy(isp->isp_osinfo.dmat, + isp->isp_osinfo.pcmd_pool[i].dmap); } goto bad; } callout_init_mtx(&pcmd->wdog, &isp->isp_osinfo.lock, 0); - if (i == isp->isp_maxcmds-1) { + if (i == isp->isp_maxcmds-1) pcmd->next = NULL; - } else { + else pcmd->next = &isp->isp_osinfo.pcmd_pool[i+1]; - } } isp->isp_osinfo.pcmd_free = &isp->isp_osinfo.pcmd_pool[0]; + + len = sizeof (isp_hdl_t) * isp->isp_maxcmds; + isp->isp_xflist = (isp_hdl_t *) malloc(len, M_DEVBUF, M_WAITOK | M_ZERO); + for (len = 0; len < isp->isp_maxcmds - 1; len++) + isp->isp_xflist[len].cmd = &isp->isp_xflist[len+1]; + isp->isp_xffree = isp->isp_xflist; + ISP_LOCK(isp); return (0); bad: + isp_pci_mbxdmafree(isp); + ISP_LOCK(isp); + return (1); +} + +static void +isp_pci_mbxdmafree(ispsoftc_t *isp) +{ + int i; + + if (isp->isp_xflist != NULL) { + free(isp->isp_xflist, M_DEVBUF); + isp->isp_xflist = NULL; + } + if (isp->isp_osinfo.pcmd_pool != NULL) { + for (i = 0; i < isp->isp_maxcmds; i++) { + bus_dmamap_destroy(isp->isp_osinfo.dmat, + isp->isp_osinfo.pcmd_pool[i].dmap); + } + free(isp->isp_osinfo.pcmd_pool, M_DEVBUF); + isp->isp_osinfo.pcmd_pool = NULL; + } if (IS_FC(isp)) { - while (--cmap >= 0) { - struct isp_fc *fc = ISP_FC_PC(isp, cmap); - bus_dmamap_unload(isp->isp_osinfo.scdmat, fc->scmap); - bus_dmamem_free(isp->isp_osinfo.scdmat, - FCPARAM(isp, cmap)->isp_scratch, fc->scmap); + for (i = 0; i < isp->isp_nchan; i++) { + struct isp_fc *fc = ISP_FC_PC(isp, i); + if (FCPARAM(isp, i)->isp_scdma != 0) { + bus_dmamap_unload(isp->isp_osinfo.scdmat, + fc->scmap); + FCPARAM(isp, i)->isp_scdma = 0; + } + if (FCPARAM(isp, i)->isp_scratch != NULL) { + bus_dmamem_free(isp->isp_osinfo.scdmat, + FCPARAM(isp, i)->isp_scratch, fc->scmap); + FCPARAM(isp, i)->isp_scratch = NULL; + } while (fc->nexus_free_list) { struct isp_nexus *n = fc->nexus_free_list; fc->nexus_free_list = n->next; free(n, M_DEVBUF); } } - bus_dma_tag_destroy(isp->isp_osinfo.scdmat); - bus_dmamap_unload(isp->isp_osinfo.iocbdmat, isp->isp_osinfo.iocbmap); - bus_dmamem_free(isp->isp_osinfo.iocbdmat, isp->isp_iocb, - isp->isp_osinfo.iocbmap); - bus_dma_tag_destroy(isp->isp_osinfo.iocbdmat); - } -bad1: - if (isp->isp_rquest_dma != 0) { - bus_dmamap_unload(isp->isp_osinfo.reqdmat, *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable-10@freebsd.org Tue Mar 28 10:24:02 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D4324D1FD7C; Tue, 28 Mar 2017 10:24:02 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A3A94A89; Tue, 28 Mar 2017 10:24:02 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2SAO1Cj018343; Tue, 28 Mar 2017 10:24:01 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2SAO1UC018342; Tue, 28 Mar 2017 10:24:01 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201703281024.v2SAO1UC018342@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 28 Mar 2017 10:24:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r316089 - stable/10/sys/dev/isp X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Mar 2017 10:24:02 -0000 Author: mav Date: Tue Mar 28 10:24:01 2017 New Revision: 316089 URL: https://svnweb.freebsd.org/changeset/base/316089 Log: MFC r315236: Remove dangerous and questionable isp_mboxcmd_qnw() call. Modified: stable/10/sys/dev/isp/isp.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/isp/isp.c ============================================================================== --- stable/10/sys/dev/isp/isp.c Tue Mar 28 10:23:32 2017 (r316088) +++ stable/10/sys/dev/isp/isp.c Tue Mar 28 10:24:01 2017 (r316089) @@ -6503,20 +6503,8 @@ isp_parse_status(ispsoftc_t *isp, ispsta isp_prt(isp, ISP_LOGINFO, "port %s for target %d", reason, XS_TGT(xs)); - /* - * If we're on a local loop, force a LIP (which is overkill) - * to force a re-login of this unit. If we're on fabric, - * then we'll have to log in again as a matter of course. - */ - if (fcp->isp_topo == TOPO_NL_PORT || - fcp->isp_topo == TOPO_FL_PORT) { - mbreg_t mbs; - MBSINIT(&mbs, MBOX_INIT_LIP, MBLOGALL, 0); - if (ISP_CAP_2KLOGIN(isp)) { - mbs.ibits = (1 << 10); - } - isp_mboxcmd_qnw(isp, &mbs, 1); - } + /* XXX: Should we trigger rescan or FW announce change? */ + if (XS_NOERR(xs)) { lp = &fcp->portdb[XS_TGT(xs)]; if (lp->state == FC_PORTDB_STATE_ZOMBIE) { @@ -6664,9 +6652,8 @@ isp_parse_status_24xx(ispsoftc_t *isp, i isp_prt(isp, ISP_LOGINFO, "Chan %d port %s for target %d", chan, reason, XS_TGT(xs)); - /* - * There is no MBOX_INIT_LIP for the 24XX. - */ + /* XXX: Should we trigger rescan or FW announce change? */ + if (XS_NOERR(xs)) { lp = &fcp->portdb[XS_TGT(xs)]; if (lp->state == FC_PORTDB_STATE_ZOMBIE) { From owner-svn-src-stable-10@freebsd.org Tue Mar 28 10:25:12 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2D4E3D1FECF; Tue, 28 Mar 2017 10:25:12 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F0313D39; Tue, 28 Mar 2017 10:25:11 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2SAPB22018520; Tue, 28 Mar 2017 10:25:11 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2SAPAah018516; Tue, 28 Mar 2017 10:25:10 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201703281025.v2SAPAah018516@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 28 Mar 2017 10:25:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r316091 - stable/10/sys/dev/isp X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Mar 2017 10:25:12 -0000 Author: mav Date: Tue Mar 28 10:25:10 2017 New Revision: 316091 URL: https://svnweb.freebsd.org/changeset/base/316091 Log: MFC r315273: Remove tangled isp_mbox_continue() mechanism. It was implemented to reduce context switches when uploading firmware to card's RAM. But this mechanism is not used last 10 years since all mbox operations are now polled, and it was never used for cards produced in last 15 years. Newer cards can use DMA to upload firmware. Modified: stable/10/sys/dev/isp/isp.c stable/10/sys/dev/isp/isp_freebsd.c stable/10/sys/dev/isp/isp_freebsd.h stable/10/sys/dev/isp/ispvar.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/isp/isp.c ============================================================================== --- stable/10/sys/dev/isp/isp.c Tue Mar 28 10:24:41 2017 (r316090) +++ stable/10/sys/dev/isp/isp.c Tue Mar 28 10:25:10 2017 (r316091) @@ -101,7 +101,6 @@ static int isp_handle_other_response(isp static void isp_parse_status(ispsoftc_t *, ispstatusreq_t *, XS_T *, long *); static void isp_parse_status_24xx(ispsoftc_t *, isp24xx_statusreq_t *, XS_T *, long *); static void isp_fastpost_complete(ispsoftc_t *, uint32_t); -static int isp_mbox_continue(ispsoftc_t *); static void isp_scsi_init(ispsoftc_t *); static void isp_scsi_channel_init(ispsoftc_t *, int); static void isp_fibre_init(ispsoftc_t *); @@ -130,7 +129,6 @@ static int isp_register_port_name_24xx(i static int isp_register_node_name_24xx(ispsoftc_t *, int); static uint16_t isp_next_handle(ispsoftc_t *, uint16_t *); static int isp_fw_state(ispsoftc_t *, int); -static void isp_mboxcmd_qnw(ispsoftc_t *, mbreg_t *, int); static void isp_mboxcmd(ispsoftc_t *, mbreg_t *); static void isp_spi_update(ispsoftc_t *, int); @@ -734,87 +732,47 @@ isp_reset(ispsoftc_t *isp, int do_load_d isp->isp_loaded_fw = 0; if (dodnld && IS_24XX(isp)) { const uint32_t *ptr = isp->isp_mdvec->dv_ispfw; - int wordload; + uint32_t la, wi, wl; /* * Keep loading until we run out of f/w. */ code_org = ptr[2]; /* 1st load address is our start addr */ - wordload = 0; for (;;) { - uint32_t la, wi, wl; isp_prt(isp, ISP_LOGDEBUG0, "load 0x%x words of code at load address 0x%x", ptr[3], ptr[2]); wi = 0; la = ptr[2]; wl = ptr[3]; - while (wi < ptr[3]) { uint32_t *cp; uint32_t nw; - nw = ISP_QUEUE_SIZE(RQUEST_QUEUE_LEN(isp)) >> 2; - if (nw > wl) { - nw = wl; - } + nw = min(wl, ISP_QUEUE_SIZE(RQUEST_QUEUE_LEN(isp)) / 4); cp = isp->isp_rquest; - for (i = 0; i < nw; i++) { - ISP_IOXPUT_32(isp, ptr[wi++], &cp[i]); - wl--; - } + for (i = 0; i < nw; i++) + ISP_IOXPUT_32(isp, ptr[wi + i], &cp[i]); MEMORYBARRIER(isp, SYNC_REQUEST, 0, ISP_QUEUE_SIZE(RQUEST_QUEUE_LEN(isp)), -1); - again: - MBSINIT(&mbs, 0, MBLOGALL, 0); - if (la < 0x10000 && nw < 0x10000) { - mbs.param[0] = MBOX_LOAD_RISC_RAM_2100; - mbs.param[1] = la; - mbs.param[2] = DMA_WD1(isp->isp_rquest_dma); - mbs.param[3] = DMA_WD0(isp->isp_rquest_dma); - mbs.param[4] = nw; - mbs.param[6] = DMA_WD3(isp->isp_rquest_dma); - mbs.param[7] = DMA_WD2(isp->isp_rquest_dma); - isp_prt(isp, ISP_LOGDEBUG0, "LOAD RISC RAM 2100 %u words at load address 0x%x", nw, la); - } else if (wordload) { - union { - const uint32_t *cp; - uint32_t *np; - } ucd; - ucd.cp = (const uint32_t *)cp; - mbs.param[0] = MBOX_WRITE_RAM_WORD_EXTENDED; - mbs.param[1] = la; - mbs.param[2] = (*ucd.np); - mbs.param[3] = (*ucd.np) >> 16; - mbs.param[8] = la >> 16; - isp->isp_mbxwrk0 = nw - 1; - isp->isp_mbxworkp = ucd.np+1; - isp->isp_mbxwrk1 = (la + 1); - isp->isp_mbxwrk8 = (la + 1) >> 16; - isp_prt(isp, ISP_LOGDEBUG0, "WRITE RAM WORD EXTENDED %u words at load address 0x%x", nw, la); - } else { - mbs.param[0] = MBOX_LOAD_RISC_RAM; - mbs.param[1] = la; - mbs.param[2] = DMA_WD1(isp->isp_rquest_dma); - mbs.param[3] = DMA_WD0(isp->isp_rquest_dma); - mbs.param[4] = nw >> 16; - mbs.param[5] = nw; - mbs.param[6] = DMA_WD3(isp->isp_rquest_dma); - mbs.param[7] = DMA_WD2(isp->isp_rquest_dma); - mbs.param[8] = la >> 16; - isp_prt(isp, ISP_LOGDEBUG0, "LOAD RISC RAM %u words at load address 0x%x", nw, la); - } + MBSINIT(&mbs, MBOX_LOAD_RISC_RAM, MBLOGALL, 0); + mbs.param[1] = la; + mbs.param[2] = DMA_WD1(isp->isp_rquest_dma); + mbs.param[3] = DMA_WD0(isp->isp_rquest_dma); + mbs.param[4] = nw >> 16; + mbs.param[5] = nw; + mbs.param[6] = DMA_WD3(isp->isp_rquest_dma); + mbs.param[7] = DMA_WD2(isp->isp_rquest_dma); + mbs.param[8] = la >> 16; + isp_prt(isp, ISP_LOGDEBUG0, "LOAD RISC RAM %u words at load address 0x%x", nw, la); isp_mboxcmd(isp, &mbs); if (mbs.param[0] != MBOX_COMMAND_COMPLETE) { - if (mbs.param[0] == MBOX_HOST_INTERFACE_ERROR) { - isp_prt(isp, ISP_LOGERR, "switching to word load"); - wordload = 1; - goto again; - } - isp_prt(isp, ISP_LOGERR, "F/W Risc Ram Load Failed"); + isp_prt(isp, ISP_LOGERR, "F/W download failed"); return; } la += nw; + wi += nw; + wl -= nw; } if (ptr[1] == 0) { @@ -843,18 +801,10 @@ isp_reset(ispsoftc_t *isp, int do_load_d uint16_t *cp; uint16_t nw; - nw = ISP_QUEUE_SIZE(RQUEST_QUEUE_LEN(isp)) >> 1; - if (nw > wl) { - nw = wl; - } - if (nw > (1 << 15)) { - nw = 1 << 15; - } + nw = min(wl, min((1 << 15), ISP_QUEUE_SIZE(RQUEST_QUEUE_LEN(isp)) / 2)); cp = isp->isp_rquest; - for (i = 0; i < nw; i++) { - ISP_IOXPUT_16(isp, ptr[wi++], &cp[i]); - wl--; - } + for (i = 0; i < nw; i++) + ISP_IOXPUT_16(isp, ptr[wi + i], &cp[i]); MEMORYBARRIER(isp, SYNC_REQUEST, 0, ISP_QUEUE_SIZE(RQUEST_QUEUE_LEN(isp)), -1); MBSINIT(&mbs, 0, MBLOGALL, 0); if (la < 0x10000) { @@ -879,10 +829,12 @@ isp_reset(ispsoftc_t *isp, int do_load_d } isp_mboxcmd(isp, &mbs); if (mbs.param[0] != MBOX_COMMAND_COMPLETE) { - isp_prt(isp, ISP_LOGERR, "F/W Risc Ram Load Failed"); + isp_prt(isp, ISP_LOGERR, "F/W download failed"); return; } la += nw; + wi += nw; + wl -= nw; } if (!IS_2322(isp)) { @@ -907,22 +859,22 @@ isp_reset(ispsoftc_t *isp, int do_load_d } isp->isp_loaded_fw = 1; } else if (dodnld) { - union { - const uint16_t *cp; - uint16_t *np; - } ucd; - ucd.cp = isp->isp_mdvec->dv_ispfw; - isp->isp_mbxworkp = &ucd.np[1]; - isp->isp_mbxwrk0 = ucd.np[3] - 1; - isp->isp_mbxwrk1 = code_org + 1; - MBSINIT(&mbs, MBOX_WRITE_RAM_WORD, MBLOGNONE, 0); - mbs.param[1] = code_org; - mbs.param[2] = ucd.np[0]; - isp_prt(isp, ISP_LOGDEBUG1, "WRITE RAM %u words at load address 0x%x", ucd.np[3], code_org); - isp_mboxcmd(isp, &mbs); - if (mbs.param[0] != MBOX_COMMAND_COMPLETE) { - isp_prt(isp, ISP_LOGERR, "F/W download failed at word %d", isp->isp_mbxwrk1 - code_org); - return; + const uint16_t *ptr = isp->isp_mdvec->dv_ispfw; + u_int i, wl; + + wl = ptr[3]; + isp_prt(isp, ISP_LOGDEBUG1, + "WRITE RAM %u words at load address 0x%x", wl, code_org); + for (i = 0; i < wl; i++) { + MBSINIT(&mbs, MBOX_WRITE_RAM_WORD, MBLOGNONE, 0); + mbs.param[1] = code_org + i; + mbs.param[2] = ptr[i]; + isp_mboxcmd(isp, &mbs); + if (mbs.param[0] != MBOX_COMMAND_COMPLETE) { + isp_prt(isp, ISP_LOGERR, + "F/W download failed at word %d", i); + return; + } } } else if (IS_26XX(isp)) { MBSINIT(&mbs, MBOX_LOAD_FLASH_FIRMWARE, MBLOGALL, 5000000); @@ -4993,11 +4945,6 @@ again: } isp->isp_mboxtmp[i] = ISP_READ(isp, MBOX_OFF(i)); } - if (isp->isp_mbxwrk0) { - if (isp_mbox_continue(isp) == 0) { - return; - } - } MBOX_NOTIFY_COMPLETE(isp); } else { isp_prt(isp, ISP_LOGWARN, "mailbox cmd (0x%x) with no waiters", info); @@ -6730,96 +6677,6 @@ isp_fastpost_complete(ispsoftc_t *isp, u isp_done(xs); } -static int -isp_mbox_continue(ispsoftc_t *isp) -{ - mbreg_t mbs; - uint16_t *ptr; - uint32_t offset; - - switch (isp->isp_lastmbxcmd) { - case MBOX_WRITE_RAM_WORD: - case MBOX_READ_RAM_WORD: - case MBOX_WRITE_RAM_WORD_EXTENDED: - case MBOX_READ_RAM_WORD_EXTENDED: - break; - default: - return (1); - } - if (isp->isp_mboxtmp[0] != MBOX_COMMAND_COMPLETE) { - isp->isp_mbxwrk0 = 0; - return (-1); - } - - /* - * Clear the previous interrupt. - */ - if (IS_24XX(isp)) { - ISP_WRITE(isp, BIU2400_HCCR, HCCR_2400_CMD_CLEAR_RISC_INT); - } else { - ISP_WRITE(isp, HCCR, HCCR_CMD_CLEAR_RISC_INT); - ISP_WRITE(isp, BIU_SEMA, 0); - } - - /* - * Continue with next word. - */ - ISP_MEMZERO(&mbs, sizeof (mbs)); - ptr = isp->isp_mbxworkp; - switch (isp->isp_lastmbxcmd) { - case MBOX_WRITE_RAM_WORD: - mbs.param[1] = isp->isp_mbxwrk1++; - mbs.param[2] = *ptr++; - break; - case MBOX_READ_RAM_WORD: - *ptr++ = isp->isp_mboxtmp[2]; - mbs.param[1] = isp->isp_mbxwrk1++; - break; - case MBOX_WRITE_RAM_WORD_EXTENDED: - if (IS_24XX(isp)) { - uint32_t *lptr = (uint32_t *)ptr; - mbs.param[2] = lptr[0]; - mbs.param[3] = lptr[0] >> 16; - lptr++; - ptr = (uint16_t *)lptr; - } else { - mbs.param[2] = *ptr++; - } - offset = isp->isp_mbxwrk1; - offset |= isp->isp_mbxwrk8 << 16; - mbs.param[1] = offset; - mbs.param[8] = offset >> 16; - offset++; - isp->isp_mbxwrk1 = offset; - isp->isp_mbxwrk8 = offset >> 16; - break; - case MBOX_READ_RAM_WORD_EXTENDED: - if (IS_24XX(isp)) { - uint32_t *lptr = (uint32_t *)ptr; - uint32_t val = isp->isp_mboxtmp[2]; - val |= (isp->isp_mboxtmp[3]) << 16; - *lptr++ = val; - ptr = (uint16_t *)lptr; - } else { - *ptr++ = isp->isp_mboxtmp[2]; - } - offset = isp->isp_mbxwrk1; - offset |= isp->isp_mbxwrk8 << 16; - mbs.param[1] = offset; - mbs.param[8] = offset >> 16; - offset++; - isp->isp_mbxwrk1 = offset; - isp->isp_mbxwrk8 = offset >> 16; - break; - } - isp->isp_mbxworkp = ptr; - isp->isp_mbxwrk0--; - mbs.param[0] = isp->isp_lastmbxcmd; - mbs.logval = MBLOGALL; - isp_mboxcmd_qnw(isp, &mbs, 0); - return (0); -} - #define ISP_SCSI_IBITS(op) (mbpscsi[((op)<<1)]) #define ISP_SCSI_OBITS(op) (mbpscsi[((op)<<1) + 1]) #define ISP_SCSI_OPMAP(in, out) in, out @@ -7294,49 +7151,6 @@ static const char *fc_mbcmd_names[] = { }; static void -isp_mboxcmd_qnw(ispsoftc_t *isp, mbreg_t *mbp, int nodelay) -{ - unsigned int ibits, obits, box, opcode; - - opcode = mbp->param[0]; - if (IS_FC(isp)) { - ibits = ISP_FC_IBITS(opcode); - obits = ISP_FC_OBITS(opcode); - } else { - ibits = ISP_SCSI_IBITS(opcode); - obits = ISP_SCSI_OBITS(opcode); - } - ibits |= mbp->ibits; - obits |= mbp->obits; - for (box = 0; box < ISP_NMBOX(isp); box++) { - if (ibits & (1 << box)) { - ISP_WRITE(isp, MBOX_OFF(box), mbp->param[box]); - } - if (nodelay == 0) { - isp->isp_mboxtmp[box] = mbp->param[box] = 0; - } - } - if (nodelay == 0) { - isp->isp_lastmbxcmd = opcode; - isp->isp_obits = obits; - isp->isp_mboxbsy = 1; - } - if (IS_24XX(isp)) { - ISP_WRITE(isp, BIU2400_HCCR, HCCR_2400_CMD_SET_HOST_INT); - } else { - ISP_WRITE(isp, HCCR, HCCR_CMD_SET_HOST_INT); - } - /* - * Oddly enough, if we're not delaying for an answer, - * delay a bit to give the f/w a chance to pick up the - * command. - */ - if (nodelay) { - ISP_DELAY(1000); - } -} - -static void isp_mboxcmd(ispsoftc_t *isp, mbreg_t *mbp) { const char *cname, *xname, *sname; Modified: stable/10/sys/dev/isp/isp_freebsd.c ============================================================================== --- stable/10/sys/dev/isp/isp_freebsd.c Tue Mar 28 10:24:41 2017 (r316090) +++ stable/10/sys/dev/isp/isp_freebsd.c Tue Mar 28 10:25:10 2017 (r316091) @@ -4412,50 +4412,33 @@ isp_mbox_acquire(ispsoftc_t *isp) void isp_mbox_wait_complete(ispsoftc_t *isp, mbreg_t *mbp) { - unsigned int usecs = mbp->timeout; - unsigned int max, olim, ilim; - - if (usecs == 0) { - usecs = MBCMD_DEFAULT_TIMEOUT; - } - max = isp->isp_mbxwrk0 + 1; + u_int t, to; + to = (mbp->timeout == 0) ? MBCMD_DEFAULT_TIMEOUT : mbp->timeout; if (isp->isp_osinfo.mbox_sleep_ok) { - unsigned int ms = (usecs + 999) / 1000; - isp->isp_osinfo.mbox_sleep_ok = 0; isp->isp_osinfo.mbox_sleeping = 1; - for (olim = 0; olim < max; olim++) { - msleep(&isp->isp_mbxworkp, &isp->isp_osinfo.lock, PRIBIO, "ispmbx_sleep", isp_mstohz(ms)); - if (isp->isp_osinfo.mboxcmd_done) { - break; - } - } + msleep_sbt(&isp->isp_osinfo.mboxcmd_done, &isp->isp_osinfo.lock, + PRIBIO, "ispmbx_sleep", to * SBT_1US, 0, 0); isp->isp_osinfo.mbox_sleep_ok = 1; isp->isp_osinfo.mbox_sleeping = 0; } else { - for (olim = 0; olim < max; olim++) { - for (ilim = 0; ilim < usecs; ilim += 100) { - uint16_t isr, sema, info; - if (isp->isp_osinfo.mboxcmd_done) { - break; - } - if (ISP_READ_ISR(isp, &isr, &sema, &info)) { - isp_intr(isp, isr, sema, info); - if (isp->isp_osinfo.mboxcmd_done) { - break; - } - } - ISP_DELAY(100); - } - if (isp->isp_osinfo.mboxcmd_done) { + for (t = 0; t < to; t += 100) { + uint16_t isr, sema, info; + if (isp->isp_osinfo.mboxcmd_done) break; + if (ISP_READ_ISR(isp, &isr, &sema, &info)) { + isp_intr(isp, isr, sema, info); + if (isp->isp_osinfo.mboxcmd_done) + break; } + ISP_DELAY(100); } } if (isp->isp_osinfo.mboxcmd_done == 0) { - isp_prt(isp, ISP_LOGWARN, "%s Mailbox Command (0x%x) Timeout (%uus) (started @ %s:%d)", - isp->isp_osinfo.mbox_sleep_ok? "Interrupting" : "Polled", isp->isp_lastmbxcmd, usecs, mbp->func, mbp->lineno); + isp_prt(isp, ISP_LOGWARN, "%s Mailbox Command (0x%x) Timeout (%uus) (%s:%d)", + isp->isp_osinfo.mbox_sleep_ok? "Interrupting" : "Polled", + isp->isp_lastmbxcmd, to, mbp->func, mbp->lineno); mbp->param[0] = MBOX_TIMEOUT; isp->isp_osinfo.mboxcmd_done = 1; } @@ -4464,10 +4447,9 @@ isp_mbox_wait_complete(ispsoftc_t *isp, void isp_mbox_notify_done(ispsoftc_t *isp) { - if (isp->isp_osinfo.mbox_sleeping) { - wakeup(&isp->isp_mbxworkp); - } isp->isp_osinfo.mboxcmd_done = 1; + if (isp->isp_osinfo.mbox_sleeping) + wakeup(&isp->isp_osinfo.mboxcmd_done); } void Modified: stable/10/sys/dev/isp/isp_freebsd.h ============================================================================== --- stable/10/sys/dev/isp/isp_freebsd.h Tue Mar 28 10:24:41 2017 (r316090) +++ stable/10/sys/dev/isp/isp_freebsd.h Tue Mar 28 10:25:10 2017 (r316091) @@ -308,11 +308,11 @@ struct isposinfo { #endif sixtyfourbit : 1, /* sixtyfour bit platform */ timer_active : 1, - autoconf : 1, - mbox_sleeping : 1, - mbox_sleep_ok : 1, - mboxcmd_done : 1, - mboxbsy : 1; + autoconf : 1; + int mbox_sleeping; + int mbox_sleep_ok; + int mboxbsy; + int mboxcmd_done; struct callout tmo; /* general timer */ Modified: stable/10/sys/dev/isp/ispvar.h ============================================================================== --- stable/10/sys/dev/isp/ispvar.h Tue Mar 28 10:24:41 2017 (r316090) +++ stable/10/sys/dev/isp/ispvar.h Tue Mar 28 10:25:10 2017 (r316091) @@ -575,12 +575,7 @@ struct ispsoftc { volatile uint32_t isp_serno; /* rolling serial number */ volatile uint16_t isp_mboxtmp[MAX_MAILBOX]; volatile uint16_t isp_lastmbxcmd; /* last mbox command sent */ - volatile uint16_t isp_mbxwrk0; - volatile uint16_t isp_mbxwrk1; - volatile uint16_t isp_mbxwrk2; - volatile uint16_t isp_mbxwrk8; volatile uint16_t isp_seqno; /* running sequence number */ - void * isp_mbxworkp; /* * Active commands are stored here, indexed by handle functions. From owner-svn-src-stable-10@freebsd.org Tue Mar 28 10:26:28 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AB19BD20079; Tue, 28 Mar 2017 10:26:28 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6D968136; Tue, 28 Mar 2017 10:26:28 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2SAQREh018699; Tue, 28 Mar 2017 10:26:27 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2SAQRJc018695; Tue, 28 Mar 2017 10:26:27 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201703281026.v2SAQRJc018695@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 28 Mar 2017 10:26:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r316093 - stable/10/sys/dev/isp X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Mar 2017 10:26:28 -0000 Author: mav Date: Tue Mar 28 10:26:27 2017 New Revision: 316093 URL: https://svnweb.freebsd.org/changeset/base/316093 Log: MFC r315279: Remove some dead/broken code paths around async handling Modified: stable/10/sys/dev/isp/isp.c stable/10/sys/dev/isp/isp_freebsd.c stable/10/sys/dev/isp/isp_target.c stable/10/sys/dev/isp/ispvar.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/isp/isp.c ============================================================================== --- stable/10/sys/dev/isp/isp.c Tue Mar 28 10:25:56 2017 (r316092) +++ stable/10/sys/dev/isp/isp.c Tue Mar 28 10:26:27 2017 (r316093) @@ -95,11 +95,11 @@ static const uint8_t alpa_map[] = { /* * Local function prototypes. */ -static int isp_parse_async(ispsoftc_t *, uint16_t); -static int isp_parse_async_fc(ispsoftc_t *, uint16_t); +static void isp_parse_async(ispsoftc_t *, uint16_t); +static void isp_parse_async_fc(ispsoftc_t *, uint16_t); static int isp_handle_other_response(ispsoftc_t *, int, isphdr_t *, uint32_t *); -static void isp_parse_status(ispsoftc_t *, ispstatusreq_t *, XS_T *, long *); static void -isp_parse_status_24xx(ispsoftc_t *, isp24xx_statusreq_t *, XS_T *, long *); +static void isp_parse_status(ispsoftc_t *, ispstatusreq_t *, XS_T *, long *); +static void isp_parse_status_24xx(ispsoftc_t *, isp24xx_statusreq_t *, XS_T *, long *); static void isp_fastpost_complete(ispsoftc_t *, uint32_t); static void isp_scsi_init(ispsoftc_t *); static void isp_scsi_channel_init(ispsoftc_t *, int); @@ -4950,10 +4950,10 @@ again: isp_prt(isp, ISP_LOGWARN, "mailbox cmd (0x%x) with no waiters", info); } } else { - i = IS_FC(isp)? isp_parse_async_fc(isp, info) : isp_parse_async(isp, info); - if (i < 0) { - return; - } + if (IS_FC(isp)) + isp_parse_async_fc(isp, info); + else + isp_parse_async(isp, info); } if ((IS_FC(isp) && info != ASYNC_RIOZIO_STALL) || isp->isp_state != ISP_RUNSTATE) { goto out; @@ -5504,13 +5504,10 @@ isp_prt_endcmd(ispsoftc_t *isp, XS_T *xs /* * Parse an ASYNC mailbox complete - * - * Return non-zero if the event has been acknowledged. */ -static int +static void isp_parse_async(ispsoftc_t *isp, uint16_t mbox) { - int acked = 0; uint32_t h1 = 0, h2 = 0; uint16_t chan = 0; @@ -5529,9 +5526,7 @@ isp_parse_async(ispsoftc_t *isp, uint16_ case ASYNC_BUS_RESET: ISP_SET_SENDMARKER(isp, chan, 1); #ifdef ISP_TARGET_MODE - if (isp_target_async(isp, chan, mbox)) { - acked = 1; - } + isp_target_async(isp, chan, mbox); #endif isp_async(isp, ISPASYNC_BUS_RESET, chan); break; @@ -5551,7 +5546,6 @@ isp_parse_async(ispsoftc_t *isp, uint16_ * restart the firmware */ isp_async(isp, ISPASYNC_FW_CRASH); - acked = 1; break; case ASYNC_RQS_XFER_ERR: @@ -5575,9 +5569,7 @@ isp_parse_async(ispsoftc_t *isp, uint16_ isp_prt(isp, ISP_LOGWARN, "timeout initiated SCSI bus reset of chan %d", chan); ISP_SET_SENDMARKER(isp, chan, 1); #ifdef ISP_TARGET_MODE - if (isp_target_async(isp, chan, mbox)) { - acked = 1; - } + isp_target_async(isp, chan, mbox); #endif break; @@ -5585,9 +5577,7 @@ isp_parse_async(ispsoftc_t *isp, uint16_ isp_prt(isp, ISP_LOGINFO, "device reset on chan %d", chan); ISP_SET_SENDMARKER(isp, chan, 1); #ifdef ISP_TARGET_MODE - if (isp_target_async(isp, chan, mbox)) { - acked = 1; - } + isp_target_async(isp, chan, mbox); #endif break; @@ -5687,14 +5677,12 @@ isp_parse_async(ispsoftc_t *isp, uint16_ } else { isp->isp_intoasync++; } - return (acked); } -static int +static void isp_parse_async_fc(ispsoftc_t *isp, uint16_t mbox) { fcparam *fcp; - int acked = 0; uint16_t chan; if (IS_DUALBUS(isp)) { @@ -5723,7 +5711,6 @@ isp_parse_async_fc(ispsoftc_t *isp, uint * restart the firmware */ isp_async(isp, ISPASYNC_FW_CRASH); - acked = 1; break; case ASYNC_RQS_XFER_ERR: @@ -5756,11 +5743,9 @@ isp_parse_async_fc(ispsoftc_t *isp, uint case ASYNC_CTIO_DONE: #ifdef ISP_TARGET_MODE - if (isp_target_async(isp, (ISP_READ(isp, OUTMAILBOX2) << 16) | ISP_READ(isp, OUTMAILBOX1), mbox)) { - acked = 1; - } else { - isp->isp_fphccmplt++; - } + isp_target_async(isp, (ISP_READ(isp, OUTMAILBOX2) << 16) | + ISP_READ(isp, OUTMAILBOX1), mbox); + isp->isp_fphccmplt++; #else isp_prt(isp, ISP_LOGWARN, "unexpected ASYNC CTIO done"); #endif @@ -5785,9 +5770,7 @@ isp_parse_async_fc(ispsoftc_t *isp, uint ISP_SET_SENDMARKER(isp, chan, 1); isp_async(isp, ISPASYNC_LIP, chan); #ifdef ISP_TARGET_MODE - if (isp_target_async(isp, chan, mbox)) { - acked = 1; - } + isp_target_async(isp, chan, mbox); #endif /* * We've had problems with data corruption occuring on @@ -5841,9 +5824,7 @@ isp_parse_async_fc(ispsoftc_t *isp, uint ISP_SET_SENDMARKER(isp, chan, 1); isp_async(isp, ISPASYNC_LOOP_UP, chan); #ifdef ISP_TARGET_MODE - if (isp_target_async(isp, chan, mbox)) { - acked = 1; - } + isp_target_async(isp, chan, mbox); #endif } break; @@ -5862,9 +5843,7 @@ isp_parse_async_fc(ispsoftc_t *isp, uint fcp->isp_loopstate = LOOP_NIL; isp_async(isp, ISPASYNC_LOOP_DOWN, chan); #ifdef ISP_TARGET_MODE - if (isp_target_async(isp, chan, mbox)) { - acked = 1; - } + isp_target_async(isp, chan, mbox); #endif } break; @@ -5884,9 +5863,7 @@ isp_parse_async_fc(ispsoftc_t *isp, uint fcp->isp_loopstate = LOOP_HAVE_LINK; isp_async(isp, ISPASYNC_LOOP_RESET, chan); #ifdef ISP_TARGET_MODE - if (isp_target_async(isp, chan, mbox)) { - acked = 1; - } + isp_target_async(isp, chan, mbox); #endif } break; @@ -5990,7 +5967,7 @@ isp_parse_async_fc(ispsoftc_t *isp, uint isp->isp_state = ISP_CRASHED; isp_prt(isp, ISP_LOGERR, "FATAL CONNECTION ERROR"); isp_async(isp, ISPASYNC_FW_CRASH); - return (-1); + return; case ISP_CONN_LOOPBACK: isp_prt(isp, ISP_LOGWARN, "Looped Back in Point-to-Point mode"); @@ -6043,7 +6020,6 @@ isp_parse_async_fc(ispsoftc_t *isp, uint if (mbox != ASYNC_CTIO_DONE && mbox != ASYNC_CMD_CMPLT) { isp->isp_intoasync++; } - return (acked); } /* Modified: stable/10/sys/dev/isp/isp_freebsd.c ============================================================================== --- stable/10/sys/dev/isp/isp_freebsd.c Tue Mar 28 10:25:56 2017 (r316092) +++ stable/10/sys/dev/isp/isp_freebsd.c Tue Mar 28 10:26:27 2017 (r316093) @@ -4290,11 +4290,13 @@ changed: mbox6 = 0; } isp_prt(isp, ISP_LOGERR, "Internal Firmware Error on bus %d @ RISC Address 0x%x", mbox6, mbox1); +#if 0 mbox1 = isp->isp_osinfo.mbox_sleep_ok; isp->isp_osinfo.mbox_sleep_ok = 0; isp_reinit(isp, 1); isp->isp_osinfo.mbox_sleep_ok = mbox1; isp_async(isp, ISPASYNC_FW_RESTARTED, NULL); +#endif break; } default: Modified: stable/10/sys/dev/isp/isp_target.c ============================================================================== --- stable/10/sys/dev/isp/isp_target.c Tue Mar 28 10:25:56 2017 (r316092) +++ stable/10/sys/dev/isp/isp_target.c Tue Mar 28 10:26:27 2017 (r316093) @@ -617,7 +617,7 @@ isp_endcmd(ispsoftc_t *isp, ...) * These are either broadcast events or specifically CTIO fast completion */ -int +void isp_target_async(ispsoftc_t *isp, int bus, int event) { isp_notify_t notify; @@ -694,7 +694,6 @@ isp_target_async(ispsoftc_t *isp, int bu } break; } - return (0); } /* Modified: stable/10/sys/dev/isp/ispvar.h ============================================================================== --- stable/10/sys/dev/isp/ispvar.h Tue Mar 28 10:25:56 2017 (r316092) +++ stable/10/sys/dev/isp/ispvar.h Tue Mar 28 10:26:27 2017 (r316093) @@ -1141,9 +1141,7 @@ int isp_endcmd(ispsoftc_t *, ...); /* * Handle an asynchronous event - * - * Return nonzero if the interrupt that generated this event has been dismissed. */ -int isp_target_async(ispsoftc_t *, int, int); +void isp_target_async(ispsoftc_t *, int, int); #endif #endif /* _ISPVAR_H */ From owner-svn-src-stable-10@freebsd.org Tue Mar 28 10:43:21 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7D23FD2091D; Tue, 28 Mar 2017 10:43:21 +0000 (UTC) (envelope-from amdmi3@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4C7A9D2; Tue, 28 Mar 2017 10:43:21 +0000 (UTC) (envelope-from amdmi3@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2SAhK0r027362; Tue, 28 Mar 2017 10:43:20 GMT (envelope-from amdmi3@FreeBSD.org) Received: (from amdmi3@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2SAhKfM027361; Tue, 28 Mar 2017 10:43:20 GMT (envelope-from amdmi3@FreeBSD.org) Message-Id: <201703281043.v2SAhKfM027361@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: amdmi3 set sender to amdmi3@FreeBSD.org using -f From: Dmitry Marakasov Date: Tue, 28 Mar 2017 10:43:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r316097 - stable/10/sbin/swapon X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Mar 2017 10:43:21 -0000 Author: amdmi3 (ports committer) Date: Tue Mar 28 10:43:20 2017 New Revision: 316097 URL: https://svnweb.freebsd.org/changeset/base/316097 Log: MFC r315242: Fix late and noauto with geli swap With the following in /etc/fstab: /dev/gpt/swap.eli none swap sw,late 0 0 swap will not be enabled, with `swapon -aL' complaining: swapon: Invalid option: late This happens because swap_on_geli_args() which parses geli arguments out of all mount options does not expect late or noauto among them. Fix this by explicitly allowing these arguments. Reviewed by: jilles Approved by: jilles Differential Revision: D9835 Modified: stable/10/sbin/swapon/swapon.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/swapon/swapon.c ============================================================================== --- stable/10/sbin/swapon/swapon.c Tue Mar 28 10:43:19 2017 (r316096) +++ stable/10/sbin/swapon/swapon.c Tue Mar 28 10:43:20 2017 (r316097) @@ -369,6 +369,10 @@ swap_on_geli_args(const char *mntops) free(ops); return (NULL); } + } else if (strcmp(token, "late") == 0) { + /* ignore known option */ + } else if (strcmp(token, "noauto") == 0) { + /* ignore known option */ } else if (strcmp(token, "sw") != 0) { warnx("Invalid option: %s", token); free(ops); From owner-svn-src-stable-10@freebsd.org Tue Mar 28 13:02:57 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7025FD21435 for ; Tue, 28 Mar 2017 13:02:57 +0000 (UTC) (envelope-from mailing-machine@vniz.net) Received: from mail-lf0-f68.google.com (mail-lf0-f68.google.com [209.85.215.68]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 02386E49 for ; Tue, 28 Mar 2017 13:02:56 +0000 (UTC) (envelope-from mailing-machine@vniz.net) Received: by mail-lf0-f68.google.com with SMTP id n78so10418038lfi.3 for ; Tue, 28 Mar 2017 06:02:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=gMGm9sas0mJtI1PMy57v2QECLHKGSs2mDaWF5Jyc3lE=; b=NVneDq9Ra203y3ltXWSp2r7cPpE8b2T/ceS6aClS20oX/gIoKePsFT4JkdPqHn4vz1 jgcOegD00Lfsy5ighogiwdrY+cwAx6wFQniBpR/k6F41/ARV3VT8ADdcRgY5nGEZnLXD /7FxhIrOry/Zq6B7caIAVXQjQp9HIuOA7cJVrBeP+fohOMtDwdmwoEH3CfF7cgJuWM5M AjItF4Av8H6H/Q4mYlxtChJfeVwehK+XWlXXdrq2FB5RR80BADt9Ne2X4HH0c5X4pGke uACRLFNG+CI1X5Nhkj1dHvy1oOJ72nLpN5KBLnhl5OrwgkljqNf9ygFs+f6/pe+kr2/e s+Aw== X-Gm-Message-State: AFeK/H0fZkT4sBDer9MltsGJRKGTfJwBYLT/xHz2a5iLe8DYNa7+nUN/birk7bVvz/pCWQ== X-Received: by 10.46.84.75 with SMTP id y11mr1680830ljd.6.1490705707386; Tue, 28 Mar 2017 05:55:07 -0700 (PDT) Received: from [192.168.1.2] ([89.169.173.68]) by smtp.gmail.com with ESMTPSA id m27sm678364ljb.24.2017.03.28.05.55.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 28 Mar 2017 05:55:06 -0700 (PDT) Subject: Re: svn commit: r316069 - in stable/10: contrib/ntp contrib/ntp/adjtimed contrib/ntp/clockstuff contrib/ntp/html contrib/ntp/include contrib/ntp/include/isc contrib/ntp/kernel contrib/ntp/kernel/sys co... To: Xin LI , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org References: <201703280448.v2S4mu6S074341@repo.freebsd.org> From: Andrey Chernov Message-ID: Date: Tue, 28 Mar 2017 15:55:05 +0300 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <201703280448.v2S4mu6S074341@repo.freebsd.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Mar 2017 13:02:57 -0000 On 28.03.2017 7:48, Xin LI wrote: > Author: delphij > Date: Tue Mar 28 04:48:55 2017 > New Revision: 316069 > URL: https://svnweb.freebsd.org/changeset/base/316069 > > Log: > MFC r315871: MFV r315791: ntp 4.2.8p10. Should /etc/ntp.conf be updated to? From owner-svn-src-stable-10@freebsd.org Wed Mar 29 01:32:36 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2DD1CD1EEF7; Wed, 29 Mar 2017 01:32:36 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E31AE2791; Wed, 29 Mar 2017 01:32:35 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2T1WZDU097236; Wed, 29 Mar 2017 01:32:35 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2T1WZob097235; Wed, 29 Mar 2017 01:32:35 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201703290132.v2T1WZob097235@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Wed, 29 Mar 2017 01:32:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r316121 - stable/10/etc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Mar 2017 01:32:36 -0000 Author: cy Date: Wed Mar 29 01:32:34 2017 New Revision: 316121 URL: https://svnweb.freebsd.org/changeset/base/316121 Log: MFC r311103 (ian): Update ntp.conf to use the ntpd pool feature. Our previous ntp.conf file configured 3 servers from freebsd.pool.ntp.org using 3 separate 'server' config lines. That is now replaced with a single 'pool' line which causes ntpd to add multiple servers from the pool. More than just making the config smaller, the pool feature in ntpd has one major advantage over configuring 3 separate servers from a pool: if a server that was added using a 'pool' statement provides bad time (initially or at some later date), ntpd automatically discards it and configures a new different server from the pool without needing to be restarted. These changes also add a 'tos' line to control how many pool servers get added, a 'restrict source' line that is required to allow ntpd to add new peers from the pool, and it deletes a 'restrict 127.127.1.0' line that does nothing and should never have been there (127.127.1.0 is not a valid IP address, it's a refclock identifier). Reviewed by: cy MFC requested by: ache Differential Revision: https://reviews.freebsd.org/D9011 Modified: stable/10/etc/ntp.conf Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/ntp.conf ============================================================================== --- stable/10/etc/ntp.conf Wed Mar 29 01:21:48 2017 (r316120) +++ stable/10/etc/ntp.conf Wed Mar 29 01:32:34 2017 (r316121) @@ -11,28 +11,43 @@ # # -# The following three servers will give you a random set of three -# NTP servers geographically close to you. -# See http://www.pool.ntp.org/ for details. Note, the pool encourages +# Set the target and limit for adding servers configured via pool statements +# or discovered dynamically via mechanisms such as broadcast and manycast. +# Ntpd automatically adds maxclock-1 servers from configured pools, and may +# add as many as maxclock*2 if necessary to ensure that at least minclock +# servers are providing good consistant time. +# +tos minclock 3 maxclock 6 + +# +# The following pool statement will give you a random set of NTP servers +# geographically close to you. A single pool statement adds multiple +# servers from the pool, according to the tos minclock/maxclock targets. +# See http://www.pool.ntp.org/ for details. Note, pool.ntp.org encourages # users with a static IP and good upstream NTP servers to add a server # to the pool. See http://www.pool.ntp.org/join.html if you are interested. # # The option `iburst' is used for faster initial synchronization. # -server 0.freebsd.pool.ntp.org iburst -server 1.freebsd.pool.ntp.org iburst -server 2.freebsd.pool.ntp.org iburst -#server 3.freebsd.pool.ntp.org iburst +pool 0.freebsd.pool.ntp.org iburst # # If you want to pick yourself which country's public NTP server -# you want sync against, comment out the above servers, uncomment -# the next ones and replace CC with the country's abbreviation. -# Make sure that the hostnames resolve to a proper IP address! -# -# server 0.CC.pool.ntp.org iburst -# server 1.CC.pool.ntp.org iburst -# server 2.CC.pool.ntp.org iburst +# you want to sync against, comment out the above pool, uncomment +# the next one, and replace CC with the country's abbreviation. +# Make sure that the hostname resolves to a proper IP address! +# +# pool 0.CC.pool.ntp.org iburst + +# +# To configure a specific server, such as an organization-wide local +# server, add lines similar to the following. One or more specific +# servers can be configured in addition to, or instead of, any server +# pools specified above. When both are configured, ntpd first adds all +# the specific servers, then adds servers from the pool until the tos +# minclock/maxclock targets are met. +# +#server time.my-internal.org iburst # # Security: @@ -40,11 +55,17 @@ server 2.freebsd.pool.ntp.org iburst # By default, only allow time queries and block all other requests # from unauthenticated clients. # +# The "restrict source" line allows peers to be mobilized when added by +# ntpd from a pool, but does not enable mobilizing a new peer association +# by other dynamic means (broadcast, manycast, ntpq commands, etc). +# # See http://support.ntp.org/bin/view/Support/AccessRestrictions # for more information. # -restrict default limited kod nomodify notrap nopeer noquery -restrict -6 default limited kod nomodify notrap nopeer noquery +restrict default limited kod nomodify notrap noquery nopeer +restrict -6 default limited kod nomodify notrap noquery nopeer +restrict source limited kod nomodify notrap noquery + # # Alternatively, the following rules would block all unauthorized access. # @@ -65,7 +86,6 @@ restrict -6 default limited kod nomodify # The following settings allow unrestricted access from the localhost restrict 127.0.0.1 restrict -6 ::1 -restrict 127.127.1.0 # # If a server loses sync with all upstream servers, NTP clients From owner-svn-src-stable-10@freebsd.org Wed Mar 29 02:21:07 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 033C4D22908; Wed, 29 Mar 2017 02:21:07 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C61E865081; Wed, 29 Mar 2017 02:21:06 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2T2L544013733; Wed, 29 Mar 2017 02:21:05 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2T2L5an013730; Wed, 29 Mar 2017 02:21:05 GMT (envelope-from np@FreeBSD.org) Message-Id: <201703290221.v2T2L5an013730@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Wed, 29 Mar 2017 02:21:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r316123 - in stable/10/sys/dev/cxgbe: . iw_cxgbe X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Mar 2017 02:21:07 -0000 Author: np Date: Wed Mar 29 02:21:05 2017 New Revision: 316123 URL: https://svnweb.freebsd.org/changeset/base/316123 Log: MFC r315201, r315920, r315921, r315922, r316008, and r316062. r315201: cxgbe(4): Fix an always-true assertion (reported by PVS-Studio). sys/dev/cxgbe/t4_main.c: PVS-Studio: Expression is Always True (CWE-571) (3) r315920: cxgbe/iw_cxgbe: c4iw_connect should always returns a -ve errno on failure. r315921: cxgbe/iw_cxgbe: alloc_ep expects a gfp_t, and it's always ok to sleep during alloc_ep. r315922: cxgbe/iw_cxgbe: allocations that use GFP_KERNEL (which is M_WAITOK on FreeBSD) cannot fail. r316008: cxgbe/iw_cxgbe: Remove unused code. r316062: cxgbe/iw_cxgbe: Defer the handling of error CQEs and RDMA_TERMINATE to the thread that deals with socket state changes. This eliminates various bad races with the ithread. Modified: stable/10/sys/dev/cxgbe/iw_cxgbe/cm.c stable/10/sys/dev/cxgbe/iw_cxgbe/iw_cxgbe.h stable/10/sys/dev/cxgbe/t4_main.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/cxgbe/iw_cxgbe/cm.c ============================================================================== --- stable/10/sys/dev/cxgbe/iw_cxgbe/cm.c Wed Mar 29 02:20:07 2017 (r316122) +++ stable/10/sys/dev/cxgbe/iw_cxgbe/cm.c Wed Mar 29 02:21:05 2017 (r316123) @@ -74,20 +74,19 @@ static spinlock_t req_lock; static TAILQ_HEAD(c4iw_ep_list, c4iw_ep_common) req_list; static struct work_struct c4iw_task; static struct workqueue_struct *c4iw_taskq; -static LIST_HEAD(timeout_list); -static spinlock_t timeout_lock; +static LIST_HEAD(err_cqe_list); +static spinlock_t err_cqe_lock; static void process_req(struct work_struct *ctx); static void start_ep_timer(struct c4iw_ep *ep); static int stop_ep_timer(struct c4iw_ep *ep); static int set_tcpinfo(struct c4iw_ep *ep); static void process_timeout(struct c4iw_ep *ep); -static void process_timedout_eps(void); +static void process_err_cqes(void); static enum c4iw_ep_state state_read(struct c4iw_ep_common *epc); static void __state_set(struct c4iw_ep_common *epc, enum c4iw_ep_state tostate); static void state_set(struct c4iw_ep_common *epc, enum c4iw_ep_state tostate); static void *alloc_ep(int size, gfp_t flags); -void __free_ep(struct c4iw_ep_common *epc); static struct rtentry * find_route(__be32 local_ip, __be32 peer_ip, __be16 local_port, __be16 peer_port, u8 tos); static void close_socket(struct socket *so); @@ -114,7 +113,10 @@ static void process_connected(struct c4i static int c4iw_so_upcall(struct socket *so, void *arg, int waitflag); static void process_socket_event(struct c4iw_ep *ep); static void release_ep_resources(struct c4iw_ep *ep); - +static int process_terminate(struct c4iw_ep *ep); +static int terminate(struct sge_iq *iq, const struct rss_header *rss, + struct mbuf *m); +static int add_ep_to_req_list(struct c4iw_ep *ep, int ep_events); #define START_EP_TIMER(ep) \ do { \ CTR3(KTR_IW_CXGBE, "start_ep_timer (%s:%d) ep %p", \ @@ -223,22 +225,32 @@ static void process_timeout(struct c4iw_ return; } -static void process_timedout_eps(void) +struct cqe_list_entry { + struct list_head entry; + struct c4iw_dev *rhp; + struct t4_cqe err_cqe; +}; + +static void +process_err_cqes(void) { - struct c4iw_ep *ep; + unsigned long flag; + struct cqe_list_entry *cle; - spin_lock(&timeout_lock); - while (!list_empty(&timeout_list)) { + spin_lock_irqsave(&err_cqe_lock, flag); + while (!list_empty(&err_cqe_list)) { struct list_head *tmp; - tmp = timeout_list.next; + tmp = err_cqe_list.next; list_del(tmp); tmp->next = tmp->prev = NULL; - spin_unlock(&timeout_lock); - ep = list_entry(tmp, struct c4iw_ep, entry); - process_timeout(ep); - spin_lock(&timeout_lock); + spin_unlock_irqrestore(&err_cqe_lock, flag); + cle = list_entry(tmp, struct cqe_list_entry, entry); + c4iw_ev_dispatch(cle->rhp, &cle->err_cqe); + free(cle, M_CXGBE); + spin_lock_irqsave(&err_cqe_lock, flag); } - spin_unlock(&timeout_lock); + spin_unlock_irqrestore(&err_cqe_lock, flag); + return; } @@ -246,23 +258,31 @@ static void process_req(struct work_struct *ctx) { struct c4iw_ep_common *epc; + unsigned long flag; + int ep_events; - process_timedout_eps(); - spin_lock(&req_lock); + process_err_cqes(); + spin_lock_irqsave(&req_lock, flag); while (!TAILQ_EMPTY(&req_list)) { epc = TAILQ_FIRST(&req_list); TAILQ_REMOVE(&req_list, epc, entry); epc->entry.tqe_prev = NULL; - spin_unlock(&req_lock); - CTR3(KTR_IW_CXGBE, "%s so :%p, ep:%p", __func__, - epc->so, epc); - if (epc->so) + ep_events = epc->ep_events; + epc->ep_events = 0; + spin_unlock_irqrestore(&req_lock, flag); + CTR4(KTR_IW_CXGBE, "%s: so %p, ep %p, events 0x%x", __func__, + epc->so, epc, ep_events); + if (ep_events & C4IW_EVENT_TERM) + process_terminate((struct c4iw_ep *)epc); + if (ep_events & C4IW_EVENT_TIMEOUT) + process_timeout((struct c4iw_ep *)epc); + if (ep_events & C4IW_EVENT_SOCKET) process_socket_event((struct c4iw_ep *)epc); c4iw_put_ep(epc); - process_timedout_eps(); - spin_lock(&req_lock); + process_err_cqes(); + spin_lock_irqsave(&req_lock, flag); } - spin_unlock(&req_lock); + spin_unlock_irqrestore(&req_lock, flag); } /* @@ -695,7 +715,7 @@ process_newconn(struct iw_cm_id *parent_ MPASS(child_so != NULL); - child_ep = alloc_ep(sizeof(*child_ep), M_WAITOK); + child_ep = alloc_ep(sizeof(*child_ep), GFP_KERNEL); CTR5(KTR_IW_CXGBE, "%s: parent so %p, parent ep %p, child so %p, child ep %p", @@ -734,28 +754,62 @@ process_newconn(struct iw_cm_id *parent_ } static int +add_ep_to_req_list(struct c4iw_ep *ep, int new_ep_event) +{ + unsigned long flag; + + spin_lock_irqsave(&req_lock, flag); + if (ep && ep->com.so) { + ep->com.ep_events |= new_ep_event; + if (!ep->com.entry.tqe_prev) { + c4iw_get_ep(&ep->com); + TAILQ_INSERT_TAIL(&req_list, &ep->com, entry); + queue_work(c4iw_taskq, &c4iw_task); + } + } + spin_unlock_irqrestore(&req_lock, flag); + + return (0); +} + +static int c4iw_so_upcall(struct socket *so, void *arg, int waitflag) { struct c4iw_ep *ep = arg; - spin_lock(&req_lock); - CTR6(KTR_IW_CXGBE, "%s: so %p, so_state 0x%x, ep %p, ep_state %s, tqe_prev %p", __func__, so, so->so_state, ep, states[ep->com.state], ep->com.entry.tqe_prev); - if (ep && ep->com.so && !ep->com.entry.tqe_prev) { - KASSERT(ep->com.so == so, ("%s: XXX review.", __func__)); - c4iw_get_ep(&ep->com); - TAILQ_INSERT_TAIL(&req_list, &ep->com, entry); - queue_work(c4iw_taskq, &c4iw_task); - } + MPASS(ep->com.so == so); + add_ep_to_req_list(ep, C4IW_EVENT_SOCKET); - spin_unlock(&req_lock); return (SU_OK); } + +static int +terminate(struct sge_iq *iq, const struct rss_header *rss, struct mbuf *m) +{ + struct adapter *sc = iq->adapter; + const struct cpl_rdma_terminate *cpl = mtod(m, const void *); + unsigned int tid = GET_TID(cpl); + struct toepcb *toep = lookup_tid(sc, tid); + struct socket *so; + struct c4iw_ep *ep; + + INP_WLOCK(toep->inp); + so = inp_inpcbtosocket(toep->inp); + ep = so->so_rcv.sb_upcallarg; + INP_WUNLOCK(toep->inp); + + CTR3(KTR_IW_CXGBE, "%s: so %p, ep %p", __func__, so, ep); + add_ep_to_req_list(ep, C4IW_EVENT_TERM); + + return 0; +} + static void process_socket_event(struct c4iw_ep *ep) { @@ -952,16 +1006,6 @@ alloc_ep(int size, gfp_t gfp) return (epc); } -void -__free_ep(struct c4iw_ep_common *epc) -{ - CTR2(KTR_IW_CXGBE, "%s:feB %p", __func__, epc); - KASSERT(!epc->so, ("%s warning ep->so %p \n", __func__, epc->so)); - KASSERT(!epc->entry.tqe_prev, ("%s epc %p still on req list!\n", __func__, epc)); - free(epc, M_DEVBUF); - CTR2(KTR_IW_CXGBE, "%s:feE %p", __func__, epc); -} - void _c4iw_free_ep(struct kref *kref) { struct c4iw_ep *ep; @@ -2148,15 +2192,7 @@ int c4iw_connect(struct iw_cm_id *cm_id, err = -EINVAL; goto out; } - ep = alloc_ep(sizeof(*ep), M_NOWAIT); - - if (!ep) { - - CTR2(KTR_IW_CXGBE, "%s:cc2 %p", __func__, cm_id); - printk(KERN_ERR MOD "%s - cannot alloc ep.\n", __func__); - err = -ENOMEM; - goto out; - } + ep = alloc_ep(sizeof(*ep), GFP_KERNEL); init_timer(&ep->timer); ep->plen = conn_param->private_data_len; @@ -2216,7 +2252,7 @@ int c4iw_connect(struct iw_cm_id *cm_id, ep->tos = 0; ep->com.local_addr = cm_id->local_addr; ep->com.remote_addr = cm_id->remote_addr; - err = soconnect(ep->com.so, (struct sockaddr *)&ep->com.remote_addr, + err = -soconnect(ep->com.so, (struct sockaddr *)&ep->com.remote_addr, ep->com.thread); if (!err) { @@ -2243,21 +2279,11 @@ out: int c4iw_create_listen_ep(struct iw_cm_id *cm_id, int backlog) { - int rc; struct c4iw_dev *dev = to_c4iw_dev(cm_id->device); struct c4iw_listen_ep *ep; struct socket *so = cm_id->so; ep = alloc_ep(sizeof(*ep), GFP_KERNEL); - CTR5(KTR_IW_CXGBE, "%s: cm_id %p, lso %p, ep %p, inp %p", __func__, - cm_id, so, ep, so->so_pcb); - if (ep == NULL) { - log(LOG_ERR, "%s: failed to alloc memory for endpoint\n", - __func__); - rc = ENOMEM; - goto failed; - } - ep->com.cm_id = cm_id; ref_cm_id(&ep->com); ep->com.dev = dev; @@ -2269,10 +2295,6 @@ c4iw_create_listen_ep(struct iw_cm_id *c cm_id->provider_data = ep; return (0); - -failed: - CTR3(KTR_IW_CXGBE, "%s: cm_id %p, FAILED (%d)", __func__, cm_id, rc); - return (-rc); } void @@ -2435,29 +2457,17 @@ int c4iw_ep_redirect(void *ctx, struct d static void ep_timeout(unsigned long arg) { struct c4iw_ep *ep = (struct c4iw_ep *)arg; - int kickit = 0; - - CTR2(KTR_IW_CXGBE, "%s:etB %p", __func__, ep); - spin_lock(&timeout_lock); if (!test_and_set_bit(TIMEOUT, &ep->com.flags)) { /* * Only insert if it is not already on the list. */ - if (!ep->entry.next) { - list_add_tail(&ep->entry, &timeout_list); - kickit = 1; + if (!(ep->com.ep_events & C4IW_EVENT_TIMEOUT)) { + CTR2(KTR_IW_CXGBE, "%s:et1 %p", __func__, ep); + add_ep_to_req_list(ep, C4IW_EVENT_TIMEOUT); } } - spin_unlock(&timeout_lock); - - if (kickit) { - - CTR2(KTR_IW_CXGBE, "%s:et1 %p", __func__, ep); - queue_work(c4iw_taskq, &c4iw_task); - } - CTR2(KTR_IW_CXGBE, "%s:etE %p", __func__, ep); } static int fw6_wr_rpl(struct adapter *sc, const __be64 *rpl) @@ -2477,40 +2487,38 @@ static int fw6_wr_rpl(struct adapter *sc static int fw6_cqe_handler(struct adapter *sc, const __be64 *rpl) { - struct t4_cqe cqe =*(const struct t4_cqe *)(&rpl[0]); + struct cqe_list_entry *cle; + unsigned long flag; - CTR2(KTR_IW_CXGBE, "%s rpl %p", __func__, rpl); - c4iw_ev_dispatch(sc->iwarp_softc, &cqe); + cle = malloc(sizeof(*cle), M_CXGBE, M_NOWAIT); + cle->rhp = sc->iwarp_softc; + cle->err_cqe = *(const struct t4_cqe *)(&rpl[0]); + + spin_lock_irqsave(&err_cqe_lock, flag); + list_add_tail(&cle->entry, &err_cqe_list); + queue_work(c4iw_taskq, &c4iw_task); + spin_unlock_irqrestore(&err_cqe_lock, flag); return (0); } -static int terminate(struct sge_iq *iq, const struct rss_header *rss, struct mbuf *m) +static int +process_terminate(struct c4iw_ep *ep) { - struct adapter *sc = iq->adapter; - const struct cpl_rdma_terminate *cpl = mtod(m, const void *); - unsigned int tid = GET_TID(cpl); struct c4iw_qp_attributes attrs; - struct toepcb *toep = lookup_tid(sc, tid); - struct socket *so; - struct c4iw_ep *ep; - - INP_WLOCK(toep->inp); - so = inp_inpcbtosocket(toep->inp); - ep = so->so_rcv.sb_upcallarg; - INP_WUNLOCK(toep->inp); CTR2(KTR_IW_CXGBE, "%s:tB %p %d", __func__, ep); if (ep && ep->com.qp) { - printk(KERN_WARNING MOD "TERM received tid %u qpid %u\n", tid, - ep->com.qp->wq.sq.qid); + printk(KERN_WARNING MOD "TERM received tid %u qpid %u\n", + ep->hwtid, ep->com.qp->wq.sq.qid); attrs.next_state = C4IW_QP_STATE_TERMINATE; c4iw_modify_qp(ep->com.dev, ep->com.qp, C4IW_QP_ATTR_NEXT_STATE, &attrs, 1); } else - printk(KERN_WARNING MOD "TERM received tid %u no ep/qp\n", tid); + printk(KERN_WARNING MOD "TERM received tid %u no ep/qp\n", + ep->hwtid); CTR2(KTR_IW_CXGBE, "%s:tE %p %d", __func__, ep); return 0; @@ -2526,8 +2534,8 @@ int __init c4iw_cm_init(void) TAILQ_INIT(&req_list); spin_lock_init(&req_lock); - INIT_LIST_HEAD(&timeout_list); - spin_lock_init(&timeout_lock); + INIT_LIST_HEAD(&err_cqe_list); + spin_lock_init(&err_cqe_lock); INIT_WORK(&c4iw_task, process_req); @@ -2541,7 +2549,7 @@ int __init c4iw_cm_init(void) void __exit c4iw_cm_term(void) { WARN_ON(!TAILQ_EMPTY(&req_list)); - WARN_ON(!list_empty(&timeout_list)); + WARN_ON(!list_empty(&err_cqe_list)); flush_workqueue(c4iw_taskq); destroy_workqueue(c4iw_taskq); Modified: stable/10/sys/dev/cxgbe/iw_cxgbe/iw_cxgbe.h ============================================================================== --- stable/10/sys/dev/cxgbe/iw_cxgbe/iw_cxgbe.h Wed Mar 29 02:20:07 2017 (r316122) +++ stable/10/sys/dev/cxgbe/iw_cxgbe/iw_cxgbe.h Wed Mar 29 02:21:05 2017 (r316123) @@ -523,6 +523,14 @@ enum c4iw_qp_state { C4IW_QP_STATE_TOT }; +/* + * IW_CXGBE event bits. + * These bits are used for handling all events for a particular 'ep' serially. + */ +#define C4IW_EVENT_SOCKET 0x0001 +#define C4IW_EVENT_TIMEOUT 0x0002 +#define C4IW_EVENT_TERM 0x0004 + static inline int c4iw_convert_state(enum ib_qp_state ib_state) { switch (ib_state) { @@ -756,6 +764,7 @@ struct c4iw_ep_common { int rpl_done; struct thread *thread; struct socket *so; + int ep_events; }; struct c4iw_listen_ep { @@ -768,7 +777,6 @@ struct c4iw_ep { struct c4iw_ep_common com; struct c4iw_ep *parent_ep; struct timer_list timer; - struct list_head entry; unsigned int atid; u32 hwtid; u32 snd_seq; Modified: stable/10/sys/dev/cxgbe/t4_main.c ============================================================================== --- stable/10/sys/dev/cxgbe/t4_main.c Wed Mar 29 02:20:07 2017 (r316122) +++ stable/10/sys/dev/cxgbe/t4_main.c Wed Mar 29 02:21:05 2017 (r316123) @@ -7850,9 +7850,9 @@ sysctl_tp_timer(SYSCTL_HANDLER_ARGS) u_int cclk_ps = 1000000000 / sc->params.vpd.cclk; MPASS(reg == A_TP_RXT_MIN || reg == A_TP_RXT_MAX || - reg == A_TP_PERS_MIN || reg == A_TP_PERS_MAX || - reg == A_TP_KEEP_IDLE || A_TP_KEEP_INTVL || reg == A_TP_INIT_SRTT || - reg == A_TP_FINWAIT2_TIMER); + reg == A_TP_PERS_MIN || reg == A_TP_PERS_MAX || + reg == A_TP_KEEP_IDLE || reg == A_TP_KEEP_INTVL || + reg == A_TP_INIT_SRTT || reg == A_TP_FINWAIT2_TIMER); tre = G_TIMERRESOLUTION(t4_read_reg(sc, A_TP_TIMER_RESOLUTION)); tp_tick_us = (cclk_ps << tre) / 1000000; From owner-svn-src-stable-10@freebsd.org Wed Mar 29 08:00:12 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 63586D23D11; Wed, 29 Mar 2017 08:00:12 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 302026714B; Wed, 29 Mar 2017 08:00:12 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2T80BBQ050420; Wed, 29 Mar 2017 08:00:11 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2T80Blx050419; Wed, 29 Mar 2017 08:00:11 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201703290800.v2T80Blx050419@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Wed, 29 Mar 2017 08:00:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r316127 - stable/10/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Mar 2017 08:00:12 -0000 Author: ngie Date: Wed Mar 29 08:00:11 2017 New Revision: 316127 URL: https://svnweb.freebsd.org/changeset/base/316127 Log: MFC r315699: Print out name of non-dynamic sysctl in sysctl_remove_oid_locked This will provide a slightly better smoking gun than just stating "can't remove non-dynamic nodes!" when calling sysctl_ctx_free(9) and sysctl_remove_{name,oid}(9) with a non-dynamic (likely static) sysctl. Modified: stable/10/sys/kern/kern_sysctl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/kern_sysctl.c ============================================================================== --- stable/10/sys/kern/kern_sysctl.c Wed Mar 29 07:30:59 2017 (r316126) +++ stable/10/sys/kern/kern_sysctl.c Wed Mar 29 08:00:11 2017 (r316127) @@ -429,7 +429,8 @@ sysctl_remove_oid_locked(struct sysctl_o if (oidp == NULL) return(EINVAL); if ((oidp->oid_kind & CTLFLAG_DYN) == 0) { - printf("can't remove non-dynamic nodes!\n"); + printf("Warning: can't remove non-dynamic nodes (%s)!\n", + oidp->oid_name); return (EINVAL); } /* From owner-svn-src-stable-10@freebsd.org Wed Mar 29 08:02:14 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 36F85D23EC4; Wed, 29 Mar 2017 08:02:14 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DDA3D67525; Wed, 29 Mar 2017 08:02:13 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2T82CrJ054135; Wed, 29 Mar 2017 08:02:12 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2T82C3A054134; Wed, 29 Mar 2017 08:02:12 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201703290802.v2T82C3A054134@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Wed, 29 Mar 2017 08:02:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r316130 - stable/10/sys/boot/forth X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Mar 2017 08:02:14 -0000 Author: ngie Date: Wed Mar 29 08:02:12 2017 New Revision: 316130 URL: https://svnweb.freebsd.org/changeset/base/316130 Log: MFC r315738: Document some more 10GbE+ network drivers in loader.conf - if_cxgbe - if_ixl - if_ixlv - sfxge Modified: stable/10/sys/boot/forth/loader.conf Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/boot/forth/loader.conf ============================================================================== --- stable/10/sys/boot/forth/loader.conf Wed Mar 29 08:01:38 2017 (r316129) +++ stable/10/sys/boot/forth/loader.conf Wed Mar 29 08:02:12 2017 (r316130) @@ -306,6 +306,7 @@ if_cm_load="NO" # SMC (90c26, 90c56, 9 if_cs_load="NO" # Crystal Semiconductor CS8920 if_cue_load="NO" # CATC USB-EL1210A USB Ethernet if_cxgb_load="NO" # Chelsio T3 10 Gigabit Ethernet +if_cxgbe_load="NO" # Chelsio T4/T5/T6 1/10/25/40/100 Gigabit Ethernet if_dc_load="NO" # DEC/Intel 21143 and various workalikes if_de_load="NO" # DEC DC21x4x Ethernet if_ed_load="NO" # National Semiconductor DS8390/WD83C690 @@ -330,6 +331,8 @@ if_iwi_load="NO" # Intel PRO/Wireless 2 if_iwn_load="NO" # Intel Wireless WiFi Link 802.11n wireless if_ixgb_load="NO" # Intel PRO/10Gb Ethernet if_ixgbe_load="NO" # Intel PRO/10Gb Ethernet PCI Express +if_ixl_load="NO" # Intel XL710 Ethernet 40Gb Base driver +if_ixlv_load="NO" # Intel XL710 Ethernet 40Gb VF driver if_jme_load="NO" # JMicron JMC250 Gigabit/JMC260 Fast Ethernet if_lagg_load="NO" # lagg(4) devices if_le_load="NO" # AMD Am7900 LANCE and Am79C9xx PCnet @@ -378,6 +381,7 @@ if_wi_load="NO" # WaveLAN/IEEE 802.11 if_wpi_load="NO" # Intel 3945ABG Wireless LAN IEEE 802.11 if_xe_load="NO" # Xircom CreditCard PCMCIA if_xl_load="NO" # 3Com Etherlink XL (3c900, 3c905, 3c905B) +sfxge_load="NO" # Solarflare 10Gb Ethernet adapter driver utopia_load="NO" # ATM PHY driver From owner-svn-src-stable-10@freebsd.org Wed Mar 29 14:58:16 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C00FDD23350; Wed, 29 Mar 2017 14:58:16 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8CEE665DD8; Wed, 29 Mar 2017 14:58:16 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2TEwFef025028; Wed, 29 Mar 2017 14:58:15 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2TEwFwP025027; Wed, 29 Mar 2017 14:58:15 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201703291458.v2TEwFwP025027@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 29 Mar 2017 14:58:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r316138 - stable/10/sbin/camcontrol X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Mar 2017 14:58:16 -0000 Author: mav Date: Wed Mar 29 14:58:15 2017 New Revision: 316138 URL: https://svnweb.freebsd.org/changeset/base/316138 Log: MFC r315711: Fix printing bits above first eight. Modified: stable/10/sbin/camcontrol/camcontrol.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/camcontrol/camcontrol.c ============================================================================== --- stable/10/sbin/camcontrol/camcontrol.c Wed Mar 29 14:57:41 2017 (r316137) +++ stable/10/sbin/camcontrol/camcontrol.c Wed Mar 29 14:58:15 2017 (r316138) @@ -5156,7 +5156,7 @@ static void cpi_print(struct ccb_pathinq *cpi) { char adapter_str[1024]; - int i; + uint64_t i; snprintf(adapter_str, sizeof(adapter_str), "%s%d:", cpi->dev_name, cpi->unit_number); @@ -5164,7 +5164,7 @@ cpi_print(struct ccb_pathinq *cpi) fprintf(stdout, "%s SIM/HBA version: %d\n", adapter_str, cpi->version_num); - for (i = 1; i < 0xff; i = i << 1) { + for (i = 1; i < UINT8_MAX; i = i << 1) { const char *str; if ((i & cpi->hba_inquiry) == 0) @@ -5204,7 +5204,7 @@ cpi_print(struct ccb_pathinq *cpi) fprintf(stdout, "%s\n", str); } - for (i = 1; i < 0xff; i = i << 1) { + for (i = 1; i < UINT32_MAX; i = i << 1) { const char *str; if ((i & cpi->hba_misc) == 0) @@ -5239,7 +5239,7 @@ cpi_print(struct ccb_pathinq *cpi) fprintf(stdout, "%s\n", str); } - for (i = 1; i < 0xff; i = i << 1) { + for (i = 1; i < UINT16_MAX; i = i << 1) { const char *str; if ((i & cpi->target_sprt) == 0) From owner-svn-src-stable-10@freebsd.org Wed Mar 29 15:34:53 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CFF31D23F28; Wed, 29 Mar 2017 15:34:53 +0000 (UTC) (envelope-from royger@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 791D1130E; Wed, 29 Mar 2017 15:34:53 +0000 (UTC) (envelope-from royger@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2TFYqPj041848; Wed, 29 Mar 2017 15:34:52 GMT (envelope-from royger@FreeBSD.org) Received: (from royger@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2TFYq2j041847; Wed, 29 Mar 2017 15:34:52 GMT (envelope-from royger@FreeBSD.org) Message-Id: <201703291534.v2TFYq2j041847@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: royger set sender to royger@FreeBSD.org using -f From: =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= Date: Wed, 29 Mar 2017 15:34:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r316140 - stable/10/sys/dev/xen/netfront X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Mar 2017 15:34:53 -0000 Author: royger Date: Wed Mar 29 15:34:52 2017 New Revision: 316140 URL: https://svnweb.freebsd.org/changeset/base/316140 Log: xen/netfront: release resources on removal Current netfront code doesn't release the resources (grants and mbufs) on removal. Add a new helper that releases the resources, so FreeBSD doesn't run out of grants or memory when performing heavy hotplug/unplug of Xen PV nic devices. This is a direct commit to stable/10 because the code in newer branches has been completely refactored and no longer has this issue. Reviewed by: royger Submitted by: Ouyangzhaowei Differential review: https://reviews.freebsd.org/D10088 Modified: stable/10/sys/dev/xen/netfront/netfront.c Modified: stable/10/sys/dev/xen/netfront/netfront.c ============================================================================== --- stable/10/sys/dev/xen/netfront/netfront.c Wed Mar 29 15:25:34 2017 (r316139) +++ stable/10/sys/dev/xen/netfront/netfront.c Wed Mar 29 15:34:52 2017 (r316140) @@ -805,6 +805,45 @@ netif_release_tx_bufs(struct netfront_in } static void +netif_release_rx_bufs_copy(struct netfront_info *np) +{ + struct mbuf *m; + grant_ref_t ref; + unsigned int i, busy, inuse; + + XN_RX_LOCK(np); + + for (busy = inuse = i = 0; i < NET_RX_RING_SIZE; i++) { + ref = np->grant_rx_ref[i]; + + if (ref == GRANT_REF_INVALID) + continue; + + inuse++; + + m = np->rx_mbufs[i]; + + if (!gnttab_end_foreign_access_ref(ref)) { + busy++; + continue; + } + + gnttab_release_grant_reference(&np->gref_rx_head, ref); + np->grant_rx_ref[i] = GRANT_REF_INVALID; + add_id_to_freelist(np->rx_mbufs, i); + + m_freem(m); + } + + if (busy != 0) + device_printf(np->xbdev, + "Unable to release %u of %u in use grant references out of %ld total.\n", + busy, inuse, NET_RX_RING_SIZE); + + XN_RX_UNLOCK(np); +} + +static void network_alloc_rx_buffers(struct netfront_info *sc) { int otherend_id = xenbus_get_otherend_id(sc->xbdev); @@ -2199,6 +2238,12 @@ netif_free(struct netfront_info *info) info->xn_ifp = NULL; } ifmedia_removeall(&info->sc_media); + netif_release_tx_bufs(info); + if (info->copying_receiver) + netif_release_rx_bufs_copy(info); + + gnttab_free_grant_references(info->gref_tx_head); + gnttab_free_grant_references(info->gref_rx_head); } static void From owner-svn-src-stable-10@freebsd.org Wed Mar 29 15:39:49 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 11768D201D9; Wed, 29 Mar 2017 15:39:49 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D4DCF2F27; Wed, 29 Mar 2017 15:39:48 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2TFdlWT042186; Wed, 29 Mar 2017 15:39:47 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2TFdlZc042185; Wed, 29 Mar 2017 15:39:47 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201703291539.v2TFdlZc042185@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 29 Mar 2017 15:39:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r316142 - stable/10/sys/dev/isp X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Mar 2017 15:39:49 -0000 Author: mav Date: Wed Mar 29 15:39:47 2017 New Revision: 316142 URL: https://svnweb.freebsd.org/changeset/base/316142 Log: MFC r315298: Fix ancient bug from r84597, which broke 23xx after r315234. Modified: stable/10/sys/dev/isp/isp_pci.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/isp/isp_pci.c ============================================================================== --- stable/10/sys/dev/isp/isp_pci.c Wed Mar 29 15:39:13 2017 (r316141) +++ stable/10/sys/dev/isp/isp_pci.c Wed Mar 29 15:39:47 2017 (r316142) @@ -1123,7 +1123,7 @@ isp_pci_rd_isr_2300(ispsoftc_t *isp, uin { uint32_t hccr, r2hisr; - if (!(BXR2(isp, IspVirt2Off(isp, BIU_ISR) & BIU2100_ISR_RISC_INT))) { + if ((BXR2(isp, IspVirt2Off(isp, BIU_ISR)) & BIU2100_ISR_RISC_INT) == 0) { *isrp = 0; return (0); } From owner-svn-src-stable-10@freebsd.org Wed Mar 29 15:41:15 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B8099D2047A; Wed, 29 Mar 2017 15:41:15 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6AF0731F3; Wed, 29 Mar 2017 15:41:15 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2TFfEGr043778; Wed, 29 Mar 2017 15:41:14 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2TFfEmA043777; Wed, 29 Mar 2017 15:41:14 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201703291541.v2TFfEmA043777@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 29 Mar 2017 15:41:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r316144 - stable/10/sys/dev/isp X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Mar 2017 15:41:15 -0000 Author: mav Date: Wed Mar 29 15:41:14 2017 New Revision: 316144 URL: https://svnweb.freebsd.org/changeset/base/316144 Log: MFC r315303: Fix panic when SIM dereferenced before allocation. Modified: stable/10/sys/dev/isp/isp_freebsd.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/isp/isp_freebsd.c ============================================================================== --- stable/10/sys/dev/isp/isp_freebsd.c Wed Mar 29 15:40:45 2017 (r316143) +++ stable/10/sys/dev/isp/isp_freebsd.c Wed Mar 29 15:41:14 2017 (r316144) @@ -362,39 +362,40 @@ isp_detach(ispsoftc_t *isp) static void isp_freeze_loopdown(ispsoftc_t *isp, int chan) { - if (IS_FC(isp)) { - struct isp_fc *fc = ISP_FC_PC(isp, chan); - if (fc->simqfrozen == 0) { - isp_prt(isp, ISP_LOGDEBUG0, - "Chan %d Freeze simq (loopdown)", chan); - fc->simqfrozen = SIMQFRZ_LOOPDOWN; - xpt_hold_boot(); - xpt_freeze_simq(fc->sim, 1); - } else { - isp_prt(isp, ISP_LOGDEBUG0, - "Chan %d Mark simq frozen (loopdown)", chan); - fc->simqfrozen |= SIMQFRZ_LOOPDOWN; - } + struct isp_fc *fc = ISP_FC_PC(isp, chan); + + if (fc->sim == NULL) + return; + if (fc->simqfrozen == 0) { + isp_prt(isp, ISP_LOGDEBUG0, + "Chan %d Freeze simq (loopdown)", chan); + fc->simqfrozen = SIMQFRZ_LOOPDOWN; + xpt_hold_boot(); + xpt_freeze_simq(fc->sim, 1); + } else { + isp_prt(isp, ISP_LOGDEBUG0, + "Chan %d Mark simq frozen (loopdown)", chan); + fc->simqfrozen |= SIMQFRZ_LOOPDOWN; } } static void isp_unfreeze_loopdown(ispsoftc_t *isp, int chan) { - if (IS_FC(isp)) { - struct isp_fc *fc = ISP_FC_PC(isp, chan); - int wasfrozen = fc->simqfrozen & SIMQFRZ_LOOPDOWN; - fc->simqfrozen &= ~SIMQFRZ_LOOPDOWN; - if (wasfrozen && fc->simqfrozen == 0) { - isp_prt(isp, ISP_LOGDEBUG0, - "Chan %d Release simq", chan); - xpt_release_simq(fc->sim, 1); - xpt_release_boot(); - } + struct isp_fc *fc = ISP_FC_PC(isp, chan); + + if (fc->sim == NULL) + return; + int wasfrozen = fc->simqfrozen & SIMQFRZ_LOOPDOWN; + fc->simqfrozen &= ~SIMQFRZ_LOOPDOWN; + if (wasfrozen && fc->simqfrozen == 0) { + isp_prt(isp, ISP_LOGDEBUG0, + "Chan %d Release simq", chan); + xpt_release_simq(fc->sim, 1); + xpt_release_boot(); } } - static int ispioctl(struct cdev *dev, u_long c, caddr_t addr, int flags, struct thread *td) { From owner-svn-src-stable-10@freebsd.org Wed Mar 29 15:43:09 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 318B7D20547; Wed, 29 Mar 2017 15:43:09 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0065F3751; Wed, 29 Mar 2017 15:43:08 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2TFh8Og046077; Wed, 29 Mar 2017 15:43:08 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2TFh7nJ046070; Wed, 29 Mar 2017 15:43:07 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201703291543.v2TFh7nJ046070@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 29 Mar 2017 15:43:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r316146 - stable/10/sys/dev/isp X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Mar 2017 15:43:09 -0000 Author: mav Date: Wed Mar 29 15:43:07 2017 New Revision: 316146 URL: https://svnweb.freebsd.org/changeset/base/316146 Log: MFC r315307: Refactor interrupt handling. Instead of single isp_intr() function doing all possible magic, introduce four different functions to handle mailbox operation completions, async events, response and ATIO queues. The goal is to isolate different code paths to make code more readable, and to make easier support for multiple interrupt vectors. Even oldest hardware in many cases can identify what code path it should run on interrupt. Contemporary hardware can assign them to different interrupt vectors. Modified: stable/10/sys/dev/isp/isp.c stable/10/sys/dev/isp/isp_freebsd.c stable/10/sys/dev/isp/isp_pci.c stable/10/sys/dev/isp/isp_sbus.c stable/10/sys/dev/isp/ispvar.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/isp/isp.c ============================================================================== --- stable/10/sys/dev/isp/isp.c Wed Mar 29 15:42:35 2017 (r316145) +++ stable/10/sys/dev/isp/isp.c Wed Mar 29 15:43:07 2017 (r316146) @@ -416,11 +416,6 @@ isp_reset(ispsoftc_t *isp, int do_load_d } /* - * Clear instrumentation - */ - isp->isp_intcnt = isp->isp_intbogus = 0; - - /* * Hit the chip over the head with hammer, * and give it a chance to recover. */ @@ -4404,7 +4399,7 @@ isp_start(XS_T *xs) ((ispreqt7_t *)reqp)->req_task_attribute = ttype; } else if (IS_FC(isp)) { /* - * See comment in isp_intr + * See comment in isp_intr_respq */ /* XS_SET_RESID(xs, 0); */ @@ -4911,6 +4906,70 @@ isp_control(ispsoftc_t *isp, ispctl_t ct * and the locking will be held throughout this function. */ +#ifdef ISP_TARGET_MODE +void +isp_intr_atioq(ispsoftc_t *isp) +{ + uint8_t qe[QENTRY_LEN]; + isphdr_t *hp; + void *addr; + uint32_t iptr, optr, oop; + + iptr = ISP_READ(isp, BIU2400_ATIO_RSPINP); + optr = isp->isp_atioodx; + while (optr != iptr) { + oop = optr; + MEMORYBARRIER(isp, SYNC_ATIOQ, oop, QENTRY_LEN, -1); + addr = ISP_QUEUE_ENTRY(isp->isp_atioq, oop); + isp_get_hdr(isp, addr, (isphdr_t *)qe); + hp = (isphdr_t *)qe; + switch (hp->rqs_entry_type) { + case RQSTYPE_NOTIFY: + case RQSTYPE_ATIO: + (void) isp_target_notify(isp, addr, &oop); + break; + default: + isp_print_qentry(isp, "?ATIOQ entry?", oop, addr); + break; + } + optr = ISP_NXT_QENTRY(oop, RESULT_QUEUE_LEN(isp)); + } + if (isp->isp_atioodx != optr) { + ISP_WRITE(isp, BIU2400_ATIO_RSPOUTP, optr); + isp->isp_atioodx = optr; + } +} +#endif + +void +isp_intr_async(ispsoftc_t *isp, uint16_t event) +{ + + if (IS_FC(isp)) + isp_parse_async_fc(isp, event); + else + isp_parse_async(isp, event); +} + +void +isp_intr_mbox(ispsoftc_t *isp, uint16_t mbox0) +{ + int i, obits; + + if (!isp->isp_mboxbsy) { + isp_prt(isp, ISP_LOGWARN, "mailbox 0x%x with no waiters", mbox0); + return; + } + obits = isp->isp_obits; + isp->isp_mboxtmp[0] = mbox0; + for (i = 1; i < ISP_NMBOX(isp); i++) { + if ((obits & (1 << i)) == 0) + continue; + isp->isp_mboxtmp[i] = ISP_READ(isp, MBOX_OFF(i)); + } + MBOX_NOTIFY_COMPLETE(isp); +} + /* * Limit our stack depth by sticking with the max likely number * of completions on a request queue at any one time. @@ -4920,165 +4979,32 @@ isp_control(ispsoftc_t *isp, ispctl_t ct #endif void -isp_intr(ispsoftc_t *isp, uint16_t isr, uint16_t sema, uint16_t info) +isp_intr_respq(ispsoftc_t *isp) { XS_T *complist[MAX_REQUESTQ_COMPLETIONS], *xs; uint32_t iptr, optr, junk; int i, nlooked = 0, ndone = 0, continuations_expected = 0; int etype, last_etype = 0; -again: - /* - * Is this a mailbox related interrupt? - * The mailbox semaphore will be nonzero if so. - */ - if (sema) { - fmbox: - if (info & MBOX_COMMAND_COMPLETE) { - isp->isp_intmboxc++; - if (isp->isp_mboxbsy) { - int obits = isp->isp_obits; - isp->isp_mboxtmp[0] = info; - for (i = 1; i < ISP_NMBOX(isp); i++) { - if ((obits & (1 << i)) == 0) { - continue; - } - isp->isp_mboxtmp[i] = ISP_READ(isp, MBOX_OFF(i)); - } - MBOX_NOTIFY_COMPLETE(isp); - } else { - isp_prt(isp, ISP_LOGWARN, "mailbox cmd (0x%x) with no waiters", info); - } - } else { - if (IS_FC(isp)) - isp_parse_async_fc(isp, info); - else - isp_parse_async(isp, info); - } - if ((IS_FC(isp) && info != ASYNC_RIOZIO_STALL) || isp->isp_state != ISP_RUNSTATE) { - goto out; - } - } - /* * We can't be getting this now. */ if (isp->isp_state != ISP_RUNSTATE) { - /* - * This seems to happen to 23XX and 24XX cards- don't know why. - */ - if (isp->isp_mboxbsy && isp->isp_lastmbxcmd == MBOX_ABOUT_FIRMWARE) { - goto fmbox; - } - isp_prt(isp, ISP_LOGINFO, "interrupt (ISR=%x SEMA=%x INFO=%x) " - "when not ready", isr, sema, info); - /* - * Thank you very much! *Burrrp*! - */ - isp->isp_residx = ISP_READ(isp, isp->isp_respinrp); - isp->isp_resodx = isp->isp_residx; - ISP_WRITE(isp, isp->isp_respoutrp, isp->isp_resodx); - if (IS_24XX(isp)) { - ISP_DISABLE_INTS(isp); - } - goto out; - } - -#ifdef ISP_TARGET_MODE - /* - * Check for ATIO Queue entries. - */ - if (IS_24XX(isp) && - (isr == ISPR2HST_ATIO_UPDATE || isr == ISPR2HST_ATIO_RSPQ_UPDATE || - isr == ISPR2HST_ATIO_UPDATE2)) { - iptr = ISP_READ(isp, BIU2400_ATIO_RSPINP); - optr = isp->isp_atioodx; - - while (optr != iptr) { - uint8_t qe[QENTRY_LEN]; - isphdr_t *hp; - uint32_t oop; - void *addr; - - oop = optr; - MEMORYBARRIER(isp, SYNC_ATIOQ, oop, QENTRY_LEN, -1); - addr = ISP_QUEUE_ENTRY(isp->isp_atioq, oop); - isp_get_hdr(isp, addr, (isphdr_t *)qe); - hp = (isphdr_t *)qe; - switch (hp->rqs_entry_type) { - case RQSTYPE_NOTIFY: - case RQSTYPE_ATIO: - (void) isp_target_notify(isp, addr, &oop); - break; - default: - isp_print_qentry(isp, "?ATIOQ entry?", oop, addr); - break; - } - optr = ISP_NXT_QENTRY(oop, RESULT_QUEUE_LEN(isp)); - } - if (isp->isp_atioodx != optr) { - ISP_WRITE(isp, BIU2400_ATIO_RSPOUTP, optr); - isp->isp_atioodx = optr; - } + isp_prt(isp, ISP_LOGINFO, "respq interrupt when not ready"); + return; } -#endif - /* - * You *must* read the Response Queue In Pointer - * prior to clearing the RISC interrupt. - * - * Debounce the 2300 if revision less than 2. - */ + iptr = ISP_READ(isp, isp->isp_respinrp); + /* Debounce the 2300 if revision less than 2. */ if (IS_2100(isp) || (IS_2300(isp) && isp->isp_revision < 2)) { - i = 0; do { + junk = iptr; iptr = ISP_READ(isp, isp->isp_respinrp); - junk = ISP_READ(isp, isp->isp_respinrp); - } while (junk != iptr && ++i < 1000); - - if (iptr != junk) { - isp_prt(isp, ISP_LOGWARN, "Response Queue Out Pointer Unstable (%x, %x)", iptr, junk); - goto out; - } - } else { - iptr = ISP_READ(isp, isp->isp_respinrp); - } - - optr = isp->isp_resodx; - if (optr == iptr && sema == 0) { - /* - * There are a lot of these- reasons unknown- mostly on - * faster Alpha machines. - * - * I tried delaying after writing HCCR_CMD_CLEAR_RISC_INT to - * make sure the old interrupt went away (to avoid 'ringing' - * effects), but that didn't stop this from occurring. - */ - if (IS_24XX(isp)) { - junk = 0; - } else if (IS_23XX(isp)) { - ISP_DELAY(100); - iptr = ISP_READ(isp, isp->isp_respinrp); - junk = ISP_READ(isp, BIU_R2HSTSLO); - } else { - junk = ISP_READ(isp, BIU_ISR); - } - if (optr == iptr) { - if (IS_23XX(isp) || IS_24XX(isp)) { - ; - } else { - sema = ISP_READ(isp, BIU_SEMA); - info = ISP_READ(isp, OUTMAILBOX0); - if ((sema & 0x3) && (info & 0x8000)) { - goto again; - } - } - isp->isp_intbogus++; - isp_prt(isp, ISP_LOGDEBUG1, "bogus intr- isr %x (%x) iptr %x optr %x", isr, junk, iptr, optr); - } + } while (junk != iptr); } isp->isp_residx = iptr; + optr = isp->isp_resodx; while (optr != iptr) { uint8_t qe[QENTRY_LEN]; ispstatusreq_t *sp = (ispstatusreq_t *) qe; @@ -5130,9 +5056,6 @@ again: for (i = 0; i < rio->req_header.rqs_seqno; i++) { isp_fastpost_complete(isp, rio->req_handles[i]); } - if (isp->isp_fpcchiwater < rio->req_header.rqs_seqno) { - isp->isp_fpcchiwater = rio->req_header.rqs_seqno; - } ISP_MEMZERO(hp, QENTRY_LEN); /* PERF */ last_etype = etype; continue; @@ -5377,10 +5300,8 @@ again: if (ndone > (MAX_REQUESTQ_COMPLETIONS - continuations_expected - 1)) { /* we'll lose some stats, but that's a small price to pay */ for (i = 0; i < ndone; i++) { - if (complist[i]) { - isp->isp_rsltccmplt++; + if (complist[i]) isp_done(complist[i]); - } } ndone = 0; } @@ -5453,17 +5374,6 @@ again: if (nlooked) { ISP_WRITE(isp, isp->isp_respoutrp, optr); isp->isp_resodx = optr; - if (isp->isp_rscchiwater < ndone) - isp->isp_rscchiwater = ndone; - } - -out: - - if (IS_24XX(isp)) { - ISP_WRITE(isp, BIU2400_HCCR, HCCR_2400_CMD_CLEAR_RISC_INT); - } else { - ISP_WRITE(isp, HCCR, HCCR_CMD_CLEAR_RISC_INT); - ISP_WRITE(isp, BIU_SEMA, 0); } for (i = 0; i < ndone; i++) { @@ -5473,7 +5383,6 @@ out: ((isp->isp_dblev & (ISP_LOGDEBUG0|ISP_LOG_CWARN) && ((!XS_NOERR(xs)) || (*XS_STSP(xs) != SCSI_GOOD))))) { isp_prt_endcmd(isp, xs); } - isp->isp_rsltccmplt++; isp_done(xs); } } @@ -5666,16 +5575,7 @@ isp_parse_async(ispsoftc_t *isp, uint16_ if (h2) { isp_prt(isp, ISP_LOGDEBUG3, "fast post/rio completion of 0x%08x", h2); isp_fastpost_complete(isp, h2); - if (isp->isp_fpcchiwater < 2) { - isp->isp_fpcchiwater = 2; - } - } else { - if (isp->isp_fpcchiwater < 1) { - isp->isp_fpcchiwater = 1; - } } - } else { - isp->isp_intoasync++; } } @@ -5733,19 +5633,16 @@ isp_parse_async_fc(ispsoftc_t *isp, uint case ASYNC_CMD_CMPLT: isp_fastpost_complete(isp, (ISP_READ(isp, OUTMAILBOX2) << 16) | ISP_READ(isp, OUTMAILBOX1)); - if (isp->isp_fpcchiwater < 1) { - isp->isp_fpcchiwater = 1; - } break; case ASYNC_RIOZIO_STALL: + isp_intr_respq(isp); break; case ASYNC_CTIO_DONE: #ifdef ISP_TARGET_MODE isp_target_async(isp, (ISP_READ(isp, OUTMAILBOX2) << 16) | ISP_READ(isp, OUTMAILBOX1), mbox); - isp->isp_fphccmplt++; #else isp_prt(isp, ISP_LOGWARN, "unexpected ASYNC CTIO done"); #endif @@ -6017,9 +5914,6 @@ isp_parse_async_fc(ispsoftc_t *isp, uint isp_prt(isp, ISP_LOGWARN, "Unknown Async Code 0x%x", mbox); break; } - if (mbox != ASYNC_CTIO_DONE && mbox != ASYNC_CMD_CMPLT) { - isp->isp_intoasync++; - } } /* @@ -6106,11 +6000,9 @@ isp_handle_other_response(ispsoftc_t *is case RQSTYPE_CTIO7: case RQSTYPE_ABTS_RCVD: case RQSTYPE_ABTS_RSP: - isp->isp_rsltccmplt++; /* count as a response completion */ #ifdef ISP_TARGET_MODE - if (isp_target_notify(isp, (ispstatusreq_t *) hp, optrp)) { + if (isp_target_notify(isp, (ispstatusreq_t *) hp, optrp)) return (1); - } #endif /* FALLTHROUGH */ case RQSTYPE_REQUEST: @@ -6649,7 +6541,6 @@ isp_fastpost_complete(ispsoftc_t *isp, u if (isp->isp_nactive) { isp->isp_nactive--; } - isp->isp_fphccmplt++; isp_done(xs); } Modified: stable/10/sys/dev/isp/isp_freebsd.c ============================================================================== --- stable/10/sys/dev/isp/isp_freebsd.c Wed Mar 29 15:42:35 2017 (r316145) +++ stable/10/sys/dev/isp/isp_freebsd.c Wed Mar 29 15:43:07 2017 (r316146) @@ -512,40 +512,6 @@ ispioctl(struct cdev *dev, u_long c, cad } break; } - case ISP_GET_STATS: - { - isp_stats_t *sp = (isp_stats_t *) addr; - - ISP_MEMZERO(sp, sizeof (*sp)); - sp->isp_stat_version = ISP_STATS_VERSION; - sp->isp_type = isp->isp_type; - sp->isp_revision = isp->isp_revision; - ISP_LOCK(isp); - sp->isp_stats[ISP_INTCNT] = isp->isp_intcnt; - sp->isp_stats[ISP_INTBOGUS] = isp->isp_intbogus; - sp->isp_stats[ISP_INTMBOXC] = isp->isp_intmboxc; - sp->isp_stats[ISP_INGOASYNC] = isp->isp_intoasync; - sp->isp_stats[ISP_RSLTCCMPLT] = isp->isp_rsltccmplt; - sp->isp_stats[ISP_FPHCCMCPLT] = isp->isp_fphccmplt; - sp->isp_stats[ISP_RSCCHIWAT] = isp->isp_rscchiwater; - sp->isp_stats[ISP_FPCCHIWAT] = isp->isp_fpcchiwater; - ISP_UNLOCK(isp); - retval = 0; - break; - } - case ISP_CLR_STATS: - ISP_LOCK(isp); - isp->isp_intcnt = 0; - isp->isp_intbogus = 0; - isp->isp_intmboxc = 0; - isp->isp_intoasync = 0; - isp->isp_rsltccmplt = 0; - isp->isp_fphccmplt = 0; - isp->isp_rscchiwater = 0; - isp->isp_fpcchiwater = 0; - ISP_UNLOCK(isp); - retval = 0; - break; case ISP_FC_GETHINFO: { struct isp_hba_device *hba = (struct isp_hba_device *) addr; @@ -2829,10 +2795,8 @@ static void isp_poll(struct cam_sim *sim) { ispsoftc_t *isp = cam_sim_softc(sim); - uint16_t isr, sema, info; - if (ISP_READ_ISR(isp, &isr, &sema, &info)) - isp_intr(isp, isr, sema, info); + ISP_RUN_ISR(isp); } @@ -2851,9 +2815,7 @@ isp_watchdog(void *arg) * Hand crank the interrupt code just to be sure the command isn't stuck somewhere. */ if (handle != ISP_HANDLE_FREE) { - uint16_t isr, sema, info; - if (ISP_READ_ISR(isp, &isr, &sema, &info) != 0) - isp_intr(isp, isr, sema, info); + ISP_RUN_ISR(isp); ohandle = handle; handle = isp_find_handle(isp, xs); } @@ -4427,14 +4389,11 @@ isp_mbox_wait_complete(ispsoftc_t *isp, isp->isp_osinfo.mbox_sleeping = 0; } else { for (t = 0; t < to; t += 100) { - uint16_t isr, sema, info; if (isp->isp_osinfo.mboxcmd_done) break; - if (ISP_READ_ISR(isp, &isr, &sema, &info)) { - isp_intr(isp, isr, sema, info); - if (isp->isp_osinfo.mboxcmd_done) - break; - } + ISP_RUN_ISR(isp); + if (isp->isp_osinfo.mboxcmd_done) + break; ISP_DELAY(100); } } @@ -4494,14 +4453,9 @@ void isp_platform_intr(void *arg) { ispsoftc_t *isp = arg; - uint16_t isr, sema, info; ISP_LOCK(isp); - isp->isp_intcnt++; - if (ISP_READ_ISR(isp, &isr, &sema, &info)) - isp_intr(isp, isr, sema, info); - else - isp->isp_intbogus++; + ISP_RUN_ISR(isp); ISP_UNLOCK(isp); } Modified: stable/10/sys/dev/isp/isp_pci.c ============================================================================== --- stable/10/sys/dev/isp/isp_pci.c Wed Mar 29 15:42:35 2017 (r316145) +++ stable/10/sys/dev/isp/isp_pci.c Wed Mar 29 15:43:07 2017 (r316146) @@ -61,9 +61,9 @@ static uint32_t isp_pci_rd_reg_2400(isps static void isp_pci_wr_reg_2400(ispsoftc_t *, int, uint32_t); static uint32_t isp_pci_rd_reg_2600(ispsoftc_t *, int); static void isp_pci_wr_reg_2600(ispsoftc_t *, int, uint32_t); -static int isp_pci_rd_isr(ispsoftc_t *, uint16_t *, uint16_t *, uint16_t *); -static int isp_pci_rd_isr_2300(ispsoftc_t *, uint16_t *, uint16_t *, uint16_t *); -static int isp_pci_rd_isr_2400(ispsoftc_t *, uint16_t *, uint16_t *, uint16_t *); +static void isp_pci_run_isr(ispsoftc_t *); +static void isp_pci_run_isr_2300(ispsoftc_t *); +static void isp_pci_run_isr_2400(ispsoftc_t *); static int isp_pci_mbxdma(ispsoftc_t *); static void isp_pci_mbxdmafree(ispsoftc_t *); static int isp_pci_dmasetup(ispsoftc_t *, XS_T *, void *); @@ -71,7 +71,7 @@ static int isp_pci_irqsetup(ispsoftc_t * static void isp_pci_dumpregs(ispsoftc_t *, const char *); static struct ispmdvec mdvec = { - isp_pci_rd_isr, + isp_pci_run_isr, isp_pci_rd_reg, isp_pci_wr_reg, isp_pci_mbxdma, @@ -84,7 +84,7 @@ static struct ispmdvec mdvec = { }; static struct ispmdvec mdvec_1080 = { - isp_pci_rd_isr, + isp_pci_run_isr, isp_pci_rd_reg_1080, isp_pci_wr_reg_1080, isp_pci_mbxdma, @@ -97,7 +97,7 @@ static struct ispmdvec mdvec_1080 = { }; static struct ispmdvec mdvec_12160 = { - isp_pci_rd_isr, + isp_pci_run_isr, isp_pci_rd_reg_1080, isp_pci_wr_reg_1080, isp_pci_mbxdma, @@ -110,7 +110,7 @@ static struct ispmdvec mdvec_12160 = { }; static struct ispmdvec mdvec_2100 = { - isp_pci_rd_isr, + isp_pci_run_isr, isp_pci_rd_reg, isp_pci_wr_reg, isp_pci_mbxdma, @@ -121,7 +121,7 @@ static struct ispmdvec mdvec_2100 = { }; static struct ispmdvec mdvec_2200 = { - isp_pci_rd_isr, + isp_pci_run_isr, isp_pci_rd_reg, isp_pci_wr_reg, isp_pci_mbxdma, @@ -132,7 +132,7 @@ static struct ispmdvec mdvec_2200 = { }; static struct ispmdvec mdvec_2300 = { - isp_pci_rd_isr_2300, + isp_pci_run_isr_2300, isp_pci_rd_reg, isp_pci_wr_reg, isp_pci_mbxdma, @@ -143,7 +143,7 @@ static struct ispmdvec mdvec_2300 = { }; static struct ispmdvec mdvec_2400 = { - isp_pci_rd_isr_2400, + isp_pci_run_isr_2400, isp_pci_rd_reg_2400, isp_pci_wr_reg_2400, isp_pci_mbxdma, @@ -154,7 +154,7 @@ static struct ispmdvec mdvec_2400 = { }; static struct ispmdvec mdvec_2500 = { - isp_pci_rd_isr_2400, + isp_pci_run_isr_2400, isp_pci_rd_reg_2400, isp_pci_wr_reg_2400, isp_pci_mbxdma, @@ -165,7 +165,7 @@ static struct ispmdvec mdvec_2500 = { }; static struct ispmdvec mdvec_2600 = { - isp_pci_rd_isr_2400, + isp_pci_run_isr_2400, isp_pci_rd_reg_2600, isp_pci_wr_reg_2600, isp_pci_mbxdma, @@ -1066,35 +1066,27 @@ isp_pci_detach(device_t dev) #define B2R4(isp, off) bus_read_4((isp)->isp_regs2, (off)) #define B2W4(isp, off, v) bus_write_4((isp)->isp_regs2, (off), (v)) -static ISP_INLINE int -isp_pci_rd_debounced(ispsoftc_t *isp, int off, uint16_t *rp) +static ISP_INLINE uint16_t +isp_pci_rd_debounced(ispsoftc_t *isp, int off) { - uint32_t val0, val1; - int i = 0; + uint16_t val, prev; + val = BXR2(isp, IspVirt2Off(isp, off)); do { - val0 = BXR2(isp, IspVirt2Off(isp, off)); - val1 = BXR2(isp, IspVirt2Off(isp, off)); - } while (val0 != val1 && ++i < 1000); - if (val0 != val1) { - return (1); - } - *rp = val0; - return (0); + prev = val; + val = BXR2(isp, IspVirt2Off(isp, off)); + } while (val != prev); + return (val); } -static int -isp_pci_rd_isr(ispsoftc_t *isp, uint16_t *isrp, uint16_t *semap, uint16_t *info) +static void +isp_pci_run_isr(ispsoftc_t *isp) { - uint16_t isr, sema; + uint16_t isr, sema, info; if (IS_2100(isp)) { - if (isp_pci_rd_debounced(isp, BIU_ISR, &isr)) { - return (0); - } - if (isp_pci_rd_debounced(isp, BIU_SEMA, &sema)) { - return (0); - } + isr = isp_pci_rd_debounced(isp, BIU_ISR); + sema = isp_pci_rd_debounced(isp, BIU_SEMA); } else { isr = BXR2(isp, IspVirt2Off(isp, BIU_ISR)); sema = BXR2(isp, IspVirt2Off(isp, BIU_SEMA)); @@ -1102,59 +1094,61 @@ isp_pci_rd_isr(ispsoftc_t *isp, uint16_t isp_prt(isp, ISP_LOGDEBUG3, "ISR 0x%x SEMA 0x%x", isr, sema); isr &= INT_PENDING_MASK(isp); sema &= BIU_SEMA_LOCK; - if (isr == 0 && sema == 0) { - return (0); - } - *isrp = isr; - if ((*semap = sema) != 0) { - if (IS_2100(isp)) { - if (isp_pci_rd_debounced(isp, OUTMAILBOX0, info)) { - return (0); - } - } else { - *info = BXR2(isp, IspVirt2Off(isp, OUTMAILBOX0)); - } - } - return (1); + if (isr == 0 && sema == 0) + return; + if (sema != 0) { + if (IS_2100(isp)) + info = isp_pci_rd_debounced(isp, OUTMAILBOX0); + else + info = BXR2(isp, IspVirt2Off(isp, OUTMAILBOX0)); + if (info & MBOX_COMMAND_COMPLETE) + isp_intr_mbox(isp, info); + else + isp_intr_async(isp, info); + if (!IS_FC(isp) && isp->isp_state == ISP_RUNSTATE) + isp_intr_respq(isp); + } else + isp_intr_respq(isp); + ISP_WRITE(isp, HCCR, HCCR_CMD_CLEAR_RISC_INT); + if (sema) + ISP_WRITE(isp, BIU_SEMA, 0); } -static int -isp_pci_rd_isr_2300(ispsoftc_t *isp, uint16_t *isrp, uint16_t *semap, uint16_t *info) +static void +isp_pci_run_isr_2300(ispsoftc_t *isp) { uint32_t hccr, r2hisr; + uint16_t isr, info; - if ((BXR2(isp, IspVirt2Off(isp, BIU_ISR)) & BIU2100_ISR_RISC_INT) == 0) { - *isrp = 0; - return (0); - } + if ((BXR2(isp, IspVirt2Off(isp, BIU_ISR)) & BIU2100_ISR_RISC_INT) == 0) + return; r2hisr = BXR4(isp, IspVirt2Off(isp, BIU_R2HSTSLO)); isp_prt(isp, ISP_LOGDEBUG3, "RISC2HOST ISR 0x%x", r2hisr); - if ((r2hisr & BIU_R2HST_INTR) == 0) { - *isrp = 0; - return (0); - } - switch ((*isrp = r2hisr & BIU_R2HST_ISTAT_MASK)) { + if ((r2hisr & BIU_R2HST_INTR) == 0) + return; + isr = r2hisr & BIU_R2HST_ISTAT_MASK; + info = r2hisr >> 16; + switch (isr) { case ISPR2HST_ROM_MBX_OK: case ISPR2HST_ROM_MBX_FAIL: case ISPR2HST_MBX_OK: case ISPR2HST_MBX_FAIL: + isp_intr_mbox(isp, info); + break; case ISPR2HST_ASYNC_EVENT: - *semap = 1; + isp_intr_async(isp, info); break; case ISPR2HST_RIO_16: - *info = ASYNC_RIO16_1; - *semap = 1; - return (1); + isp_intr_async(isp, ASYNC_RIO16_1); + break; case ISPR2HST_FPOST: - *info = ASYNC_CMD_CMPLT; - *semap = 1; - return (1); + isp_intr_async(isp, ASYNC_CMD_CMPLT); + break; case ISPR2HST_FPOST_CTIO: - *info = ASYNC_CTIO_DONE; - *semap = 1; - return (1); + isp_intr_async(isp, ASYNC_CTIO_DONE); + break; case ISPR2HST_RSPQ_UPDATE: - *semap = 0; + isp_intr_respq(isp); break; default: hccr = ISP_READ(isp, HCCR); @@ -1165,45 +1159,52 @@ isp_pci_rd_isr_2300(ispsoftc_t *isp, uin } else { isp_prt(isp, ISP_LOGERR, "unknown interrupt 0x%x\n", r2hisr); } - return (0); } - *info = (r2hisr >> 16); - return (1); + ISP_WRITE(isp, HCCR, HCCR_CMD_CLEAR_RISC_INT); + ISP_WRITE(isp, BIU_SEMA, 0); } -static int -isp_pci_rd_isr_2400(ispsoftc_t *isp, uint16_t *isrp, uint16_t *semap, uint16_t *info) +static void +isp_pci_run_isr_2400(ispsoftc_t *isp) { uint32_t r2hisr; + uint16_t isr, info; r2hisr = BXR4(isp, IspVirt2Off(isp, BIU2400_R2HSTSLO)); isp_prt(isp, ISP_LOGDEBUG3, "RISC2HOST ISR 0x%x", r2hisr); - if ((r2hisr & BIU_R2HST_INTR) == 0) { - *isrp = 0; - return (0); - } - switch ((*isrp = r2hisr & BIU_R2HST_ISTAT_MASK)) { + if ((r2hisr & BIU_R2HST_INTR) == 0) + return; + isr = r2hisr & BIU_R2HST_ISTAT_MASK; + info = (r2hisr >> 16); + switch (isr) { case ISPR2HST_ROM_MBX_OK: case ISPR2HST_ROM_MBX_FAIL: case ISPR2HST_MBX_OK: case ISPR2HST_MBX_FAIL: + isp_intr_mbox(isp, info); + break; case ISPR2HST_ASYNC_EVENT: - *semap = 1; + isp_intr_async(isp, info); break; case ISPR2HST_RSPQ_UPDATE: + isp_intr_respq(isp); + break; case ISPR2HST_RSPQ_UPDATE2: - case ISPR2HST_ATIO_UPDATE: +#ifdef ISP_TARGET_MODE case ISPR2HST_ATIO_RSPQ_UPDATE: +#endif + isp_intr_respq(isp); + /* FALLTHROUGH */ +#ifdef ISP_TARGET_MODE + case ISPR2HST_ATIO_UPDATE: case ISPR2HST_ATIO_UPDATE2: - *semap = 0; + isp_intr_atioq(isp); +#endif break; default: - ISP_WRITE(isp, BIU2400_HCCR, HCCR_2400_CMD_CLEAR_RISC_INT); isp_prt(isp, ISP_LOGERR, "unknown interrupt 0x%x\n", r2hisr); - return (0); } - *info = (r2hisr >> 16); - return (1); + ISP_WRITE(isp, BIU2400_HCCR, HCCR_2400_CMD_CLEAR_RISC_INT); } static uint32_t Modified: stable/10/sys/dev/isp/isp_sbus.c ============================================================================== --- stable/10/sys/dev/isp/isp_sbus.c Wed Mar 29 15:42:35 2017 (r316145) +++ stable/10/sys/dev/isp/isp_sbus.c Wed Mar 29 15:43:07 2017 (r316146) @@ -53,14 +53,14 @@ __FBSDID("$FreeBSD$"); static uint32_t isp_sbus_rd_reg(ispsoftc_t *, int); static void isp_sbus_wr_reg(ispsoftc_t *, int, uint32_t); -static int isp_sbus_rd_isr(ispsoftc_t *, uint16_t *, uint16_t *, uint16_t *); +static void isp_sbus_run_isr(ispsoftc_t *); static int isp_sbus_mbxdma(ispsoftc_t *); static void isp_sbus_mbxdmafree(ispsoftc_t *); static int isp_sbus_dmasetup(ispsoftc_t *, XS_T *, void *); static void isp_sbus_dumpregs(ispsoftc_t *, const char *); static struct ispmdvec mdvec = { - isp_sbus_rd_isr, + isp_sbus_run_isr, isp_sbus_rd_reg, isp_sbus_wr_reg, isp_sbus_mbxdma, @@ -344,23 +344,31 @@ isp_sbus_detach(device_t dev) #define BXR2(isp, off) bus_read_2((isp)->isp_regs, (off)) -static int -isp_sbus_rd_isr(ispsoftc_t *isp, uint16_t *isrp, uint16_t *semap, uint16_t *info) +static void +isp_sbus_run_isr(ispsoftc_t *isp) { - uint16_t isr, sema; + uint16_t isr, sema, info; isr = BXR2(isp, IspVirt2Off(isp, BIU_ISR)); sema = BXR2(isp, IspVirt2Off(isp, BIU_SEMA)); isp_prt(isp, ISP_LOGDEBUG3, "ISR 0x%x SEMA 0x%x", isr, sema); isr &= INT_PENDING_MASK(isp); sema &= BIU_SEMA_LOCK; - if (isr == 0 && sema == 0) { - return (0); - } - *isrp = isr; - if ((*semap = sema) != 0) - *info = BXR2(isp, IspVirt2Off(isp, OUTMAILBOX0)); - return (1); + if (isr == 0 && sema == 0) + return; + if (sema != 0) { + info = BXR2(isp, IspVirt2Off(isp, OUTMAILBOX0)); + if (info & MBOX_COMMAND_COMPLETE) + isp_intr_mbox(isp, info); + else + isp_intr_async(isp, info); + if (isp->isp_state == ISP_RUNSTATE) + isp_intr_respq(isp); + } else + isp_intr_respq(isp); + ISP_WRITE(isp, HCCR, HCCR_CMD_CLEAR_RISC_INT); + if (sema) + ISP_WRITE(isp, BIU_SEMA, 0); } static uint32_t Modified: stable/10/sys/dev/isp/ispvar.h ============================================================================== --- stable/10/sys/dev/isp/ispvar.h Wed Mar 29 15:42:35 2017 (r316145) +++ stable/10/sys/dev/isp/ispvar.h Wed Mar 29 15:43:07 2017 (r316146) @@ -58,7 +58,7 @@ */ typedef struct ispsoftc ispsoftc_t; struct ispmdvec { - int (*dv_rd_isr) (ispsoftc_t *, uint16_t *, uint16_t *, uint16_t *); + void (*dv_run_isr) (ispsoftc_t *); uint32_t (*dv_rd_reg) (ispsoftc_t *, int); void (*dv_wr_reg) (ispsoftc_t *, int, uint32_t); int (*dv_mbxdma) (ispsoftc_t *); @@ -85,8 +85,8 @@ struct ispmdvec { * Macros to access ISP registers through bus specific layers- * mostly wrappers to vector through the mdvec structure. */ -#define ISP_READ_ISR(isp, isrp, semap, info) \ - (*(isp)->isp_mdvec->dv_rd_isr)(isp, isrp, semap, info) +#define ISP_RUN_ISR(isp) \ + (*(isp)->isp_mdvec->dv_run_isr)(isp) #define ISP_READ(isp, reg) \ (*(isp)->isp_mdvec->dv_rd_reg)((isp), (reg)) @@ -544,18 +544,6 @@ struct ispsoftc { uint32_t isp_rqstoutrp; /* register for REQOUTP */ uint32_t isp_respinrp; /* register for RESINP */ uint32_t isp_respoutrp; /* register for RESOUTP */ - - /* - * Instrumentation - */ - uint64_t isp_intcnt; /* total int count */ - uint64_t isp_intbogus; /* spurious int count */ - uint64_t isp_intmboxc; /* mbox completions */ - uint64_t isp_intoasync; /* other async */ - uint64_t isp_rsltccmplt; /* CMDs on result q */ - uint64_t isp_fphccmplt; /* CMDs via fastpost */ - uint16_t isp_rscchiwater; - uint16_t isp_fpcchiwater; NANOTIME_T isp_init_time; /* time were last initialized */ /* @@ -813,12 +801,13 @@ void isp_shutdown(ispsoftc_t *); /* * Internal Interrupt Service Routine - * - * The outer layers do the spade work to get the appropriate status register, - * semaphore register and first mailbox register (if appropriate). This also - * means that most spurious/bogus interrupts not for us can be filtered first. */ -void isp_intr(ispsoftc_t *, uint16_t, uint16_t, uint16_t); +#ifdef ISP_TARGET_MODE +void isp_intr_atioq(ispsoftc_t *); +#endif +void isp_intr_async(ispsoftc_t *, uint16_t event); +void isp_intr_mbox(ispsoftc_t *, uint16_t mbox0); +void isp_intr_respq(ispsoftc_t *); /* From owner-svn-src-stable-10@freebsd.org Wed Mar 29 15:44:23 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5F086D206B2; Wed, 29 Mar 2017 15:44:23 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 39CAF3920; Wed, 29 Mar 2017 15:44:23 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2TFiMLI046262; Wed, 29 Mar 2017 15:44:22 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2TFiMvR046260; Wed, 29 Mar 2017 15:44:22 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201703291544.v2TFiMvR046260@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 29 Mar 2017 15:44:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r316148 - stable/10/sys/dev/isp X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Mar 2017 15:44:23 -0000 Author: mav Date: Wed Mar 29 15:44:22 2017 New Revision: 316148 URL: https://svnweb.freebsd.org/changeset/base/316148 Log: MFC r315327: Remove not very useful ATIO/INOT stats. While there polish respective debug logging. Modified: stable/10/sys/dev/isp/isp_freebsd.c stable/10/sys/dev/isp/isp_freebsd.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/isp/isp_freebsd.c ============================================================================== --- stable/10/sys/dev/isp/isp_freebsd.c Wed Mar 29 15:43:51 2017 (r316147) +++ stable/10/sys/dev/isp/isp_freebsd.c Wed Mar 29 15:44:22 2017 (r316148) @@ -1742,8 +1742,7 @@ isp_handle_platform_atio2(ispsoftc_t *is atp->state = ATPD_STATE_ATIO; SLIST_REMOVE_HEAD(&tptr->atios, sim_links.sle); - tptr->atio_count--; - isp_prt(isp, ISP_LOGTDEBUG2, "Take FREE ATIO count now %d", tptr->atio_count); + ISP_PATH_PRT(isp, ISP_LOGTDEBUG2, atiop->ccb_h.path, "Take FREE ATIO\n"); atiop->ccb_h.target_id = fcp->isp_loopid; atiop->ccb_h.target_lun = lun; @@ -1955,8 +1954,7 @@ isp_handle_platform_atio7(ispsoftc_t *is atp->word3 = lp->prli_word3; atp->state = ATPD_STATE_ATIO; SLIST_REMOVE_HEAD(&tptr->atios, sim_links.sle); - tptr->atio_count--; - ISP_PATH_PRT(isp, ISP_LOGTDEBUG2, atiop->ccb_h.path, "Take FREE ATIO count now %d\n", tptr->atio_count); + ISP_PATH_PRT(isp, ISP_LOGTDEBUG2, atiop->ccb_h.path, "Take FREE ATIO\n"); atiop->init_id = FC_PORTDB_TGT(isp, chan, lp); atiop->ccb_h.target_id = FCPARAM(isp, chan)->isp_loopid; atiop->ccb_h.target_lun = lun; @@ -2697,9 +2695,8 @@ isp_handle_platform_target_tmf(ispsoftc_ ntp->seq_id = notify->nt_tagval; ntp->tag_id = notify->nt_tagval >> 32; - tptr->inot_count--; SLIST_REMOVE_HEAD(&tptr->inots, sim_links.sle); - ISP_PATH_PRT(isp, ISP_LOGTDEBUG2, inot->ccb_h.path, "%s: Take FREE INOT count now %d\n", __func__, tptr->inot_count); + ISP_PATH_PRT(isp, ISP_LOGTDEBUG2, inot->ccb_h.path, "Take FREE INOT\n"); inot->ccb_h.status = CAM_MESSAGE_RECV; xpt_done((union ccb *)inot); return; @@ -3155,7 +3152,8 @@ isp_abort_atio(ispsoftc_t *isp, union cc if (sccb != &accb->ccb_h) continue; SLIST_REMOVE(&tptr->atios, sccb, ccb_hdr, sim_links.sle); - tptr->atio_count--; + ISP_PATH_PRT(isp, ISP_LOGTDEBUG2, sccb->path, + "Abort FREE ATIO\n"); accb->ccb_h.status = CAM_REQ_ABORTED; xpt_done(accb); ccb->ccb_h.status = CAM_REQ_CMP; @@ -3205,7 +3203,8 @@ isp_abort_inot(ispsoftc_t *isp, union cc if (sccb != &accb->ccb_h) continue; SLIST_REMOVE(&tptr->inots, sccb, ccb_hdr, sim_links.sle); - tptr->inot_count--; + ISP_PATH_PRT(isp, ISP_LOGTDEBUG2, sccb->path, + "Abort FREE INOT\n"); accb->ccb_h.status = CAM_REQ_ABORTED; xpt_done(accb); ccb->ccb_h.status = CAM_REQ_CMP; @@ -3349,16 +3348,14 @@ isp_action(struct cam_sim *sim, union cc if (ccb->ccb_h.func_code == XPT_ACCEPT_TARGET_IO) { ccb->atio.tag_id = 0; - tptr->atio_count++; SLIST_INSERT_HEAD(&tptr->atios, &ccb->ccb_h, sim_links.sle); ISP_PATH_PRT(isp, ISP_LOGTDEBUG2, ccb->ccb_h.path, - "Put FREE ATIO, count now %d\n", tptr->atio_count); + "Put FREE ATIO\n"); } else if (ccb->ccb_h.func_code == XPT_IMMEDIATE_NOTIFY) { ccb->cin1.seq_id = ccb->cin1.tag_id = 0; - tptr->inot_count++; SLIST_INSERT_HEAD(&tptr->inots, &ccb->ccb_h, sim_links.sle); ISP_PATH_PRT(isp, ISP_LOGTDEBUG2, ccb->ccb_h.path, - "Put FREE INOT, count now %d\n", tptr->inot_count); + "Put FREE INOT\n"); } ccb->ccb_h.status = CAM_REQ_INPROG; break; Modified: stable/10/sys/dev/isp/isp_freebsd.h ============================================================================== --- stable/10/sys/dev/isp/isp_freebsd.h Wed Mar 29 15:43:51 2017 (r316147) +++ stable/10/sys/dev/isp/isp_freebsd.h Wed Mar 29 15:44:22 2017 (r316148) @@ -160,8 +160,6 @@ typedef struct tstate { struct ccb_hdr_slist atios; struct ccb_hdr_slist inots; struct ntpdlist restart_queue; - uint16_t atio_count; - uint16_t inot_count; } tstate_t; #define LUN_HASH_SIZE 32 From owner-svn-src-stable-10@freebsd.org Wed Mar 29 15:45:35 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D26F0D20824; Wed, 29 Mar 2017 15:45:35 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 907223BEE; Wed, 29 Mar 2017 15:45:35 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2TFjYB1046486; Wed, 29 Mar 2017 15:45:34 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2TFjYtb046484; Wed, 29 Mar 2017 15:45:34 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201703291545.v2TFjYtb046484@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 29 Mar 2017 15:45:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r316151 - stable/10/sys/dev/isp X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Mar 2017 15:45:35 -0000 Author: mav Date: Wed Mar 29 15:45:34 2017 New Revision: 316151 URL: https://svnweb.freebsd.org/changeset/base/316151 Log: MFC r315478: Do some notify acks cleanup. ISPASYNC_TARGET_NOTIFY_ACK makes no sense without argument. Modified: stable/10/sys/dev/isp/isp_freebsd.c stable/10/sys/dev/isp/isp_target.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/isp/isp_freebsd.c ============================================================================== --- stable/10/sys/dev/isp/isp_freebsd.c Wed Mar 29 15:45:19 2017 (r316150) +++ stable/10/sys/dev/isp/isp_freebsd.c Wed Mar 29 15:45:34 2017 (r316151) @@ -2701,7 +2701,7 @@ isp_handle_platform_target_tmf(ispsoftc_ xpt_done((union ccb *)inot); return; bad: - if (notify->nt_need_ack && notify->nt_lreserved) { + if (notify->nt_need_ack) { if (((isphdr_t *)notify->nt_lreserved)->rqs_entry_type == RQSTYPE_ABTS_RCVD) { if (isp_acknak_abts(isp, notify->nt_lreserved, ENOMEM)) { isp_prt(isp, ISP_LOGWARN, "you lose- unable to send an ACKNAK"); @@ -3215,7 +3215,10 @@ isp_abort_inot(ispsoftc_t *isp, union cc /* Search for the INOT among running. */ ntp = isp_find_ntpd(isp, XS_CHANNEL(accb), accb->cin1.tag_id, accb->cin1.seq_id); if (ntp != NULL) { - isp_async(isp, ISPASYNC_TARGET_NOTIFY_ACK, ntp->data); + if (ntp->nt.nt_need_ack) { + isp_async(isp, ISPASYNC_TARGET_NOTIFY_ACK, + ntp->nt.nt_lreserved); + } isp_put_ntpd(isp, XS_CHANNEL(accb), ntp); ccb->ccb_h.status = CAM_REQ_CMP; } else { @@ -4142,12 +4145,8 @@ changed: isp_tna_t *tp = malloc(sizeof (*tp), M_DEVBUF, M_NOWAIT); if (tp) { tp->isp = isp; - if (inot) { - memcpy(tp->data, inot, sizeof (tp->data)); - tp->not = tp->data; - } else { - tp->not = NULL; - } + memcpy(tp->data, inot, sizeof (tp->data)); + tp->not = tp->data; callout_init_mtx(&tp->timer, &isp->isp_lock, 0); callout_reset(&tp->timer, 5, isp_refire_notify_ack, tp); Modified: stable/10/sys/dev/isp/isp_target.c ============================================================================== --- stable/10/sys/dev/isp/isp_target.c Wed Mar 29 15:45:19 2017 (r316150) +++ stable/10/sys/dev/isp/isp_target.c Wed Mar 29 15:45:34 2017 (r316151) @@ -689,9 +689,6 @@ isp_target_async(ispsoftc_t *isp, int bu } default: isp_prt(isp, ISP_LOGERR, "%s: unknown event 0x%x", __func__, event); - if (isp->isp_state == ISP_RUNSTATE) { - isp_async(isp, ISPASYNC_TARGET_NOTIFY_ACK, NULL); - } break; } } @@ -838,7 +835,7 @@ isp_notify_ack(ispsoftc_t *isp, void *ar /* * This is in case a Task Management Function ends up here. */ - if (IS_24XX(isp) && arg != NULL && (((isphdr_t *)arg)->rqs_entry_type == RQSTYPE_ATIO)) { + if (IS_24XX(isp) && ((isphdr_t *)arg)->rqs_entry_type == RQSTYPE_ATIO) { at7_entry_t *aep = arg; return (isp_endcmd(isp, aep, NIL_HANDLE, 0, 0, 0)); } @@ -852,70 +849,68 @@ isp_notify_ack(ispsoftc_t *isp, void *ar ISP_MEMZERO(storage, QENTRY_LEN); if (IS_24XX(isp)) { + in_fcentry_24xx_t *in = arg; na_fcentry_24xx_t *na = (na_fcentry_24xx_t *) storage; + na->na_header.rqs_entry_type = RQSTYPE_NOTIFY_ACK; na->na_header.rqs_entry_count = 1; - if (arg) { - in_fcentry_24xx_t *in = arg; - na->na_nphdl = in->in_nphdl; - na->na_flags = in->in_flags; - na->na_status = in->in_status; - na->na_status_subcode = in->in_status_subcode; - na->na_fwhandle = in->in_fwhandle; - na->na_rxid = in->in_rxid; - na->na_oxid = in->in_oxid; - na->na_vpidx = in->in_vpidx; - if (in->in_status == IN24XX_SRR_RCVD) { - na->na_srr_rxid = in->in_srr_rxid; - na->na_srr_reloff_hi = in->in_srr_reloff_hi; - na->na_srr_reloff_lo = in->in_srr_reloff_lo; - na->na_srr_iu = in->in_srr_iu; - /* - * Whether we're accepting the SRR or rejecting - * it is determined by looking at the in_reserved - * field in the original notify structure. - */ - if (in->in_reserved) { - na->na_srr_flags = 1; - na->na_srr_reject_vunique = 0; - na->na_srr_reject_code = 9; /* unable to perform this command at this time */ - na->na_srr_reject_explanation = 0x2a; /* unable to supply the requested data */ - } + na->na_nphdl = in->in_nphdl; + na->na_flags = in->in_flags; + na->na_status = in->in_status; + na->na_status_subcode = in->in_status_subcode; + na->na_fwhandle = in->in_fwhandle; + na->na_rxid = in->in_rxid; + na->na_oxid = in->in_oxid; + na->na_vpidx = in->in_vpidx; + if (in->in_status == IN24XX_SRR_RCVD) { + na->na_srr_rxid = in->in_srr_rxid; + na->na_srr_reloff_hi = in->in_srr_reloff_hi; + na->na_srr_reloff_lo = in->in_srr_reloff_lo; + na->na_srr_iu = in->in_srr_iu; + /* + * Whether we're accepting the SRR or rejecting + * it is determined by looking at the in_reserved + * field in the original notify structure. + */ + if (in->in_reserved) { + na->na_srr_flags = 1; + na->na_srr_reject_vunique = 0; + /* Unable to perform this command at this time. */ + na->na_srr_reject_code = 9; + /* Unable to supply the requested data. */ + na->na_srr_reject_explanation = 0x2a; } } isp_put_notify_24xx_ack(isp, na, (na_fcentry_24xx_t *)outp); } else { + in_fcentry_t *in = arg; na_fcentry_t *na = (na_fcentry_t *) storage; - int iid = 0; + int iid; - if (arg) { - in_fcentry_t *inp = arg; - ISP_MEMCPY(storage, arg, sizeof (isphdr_t)); - if (ISP_CAP_2KLOGIN(isp)) { - ((na_fcentry_e_t *)na)->na_iid = ((in_fcentry_e_t *)inp)->in_iid; - iid = ((na_fcentry_e_t *)na)->na_iid; - } else { - na->na_iid = inp->in_iid; - iid = na->na_iid; - } - na->na_task_flags = inp->in_task_flags & TASK_FLAGS_RESERVED_MASK; - na->na_seqid = inp->in_seqid; - na->na_status = inp->in_status; - na->na_flags = NAFC_RCOUNT; - if (inp->in_status == IN_RESET) { - na->na_flags = NAFC_RST_CLRD; /* We do not modify resource counts for LIP resets */ - } - if (inp->in_status == IN_MSG_RECEIVED) { - na->na_flags |= NAFC_TVALID; - na->na_response = 0; /* XXX SUCCEEDED XXX */ - } + ISP_MEMCPY(storage, arg, sizeof (isphdr_t)); + if (ISP_CAP_2KLOGIN(isp)) { + iid = ((in_fcentry_e_t *)in)->in_iid; + ((na_fcentry_e_t *)na)->na_iid = iid; } else { + iid = in->in_iid; + na->na_iid = iid; + } + na->na_task_flags = in->in_task_flags & TASK_FLAGS_RESERVED_MASK; + na->na_seqid = in->in_seqid; + na->na_status = in->in_status; + na->na_flags = NAFC_RCOUNT; + /* We do not modify resource counts for LIP resets */ + if (in->in_status == IN_RESET) na->na_flags = NAFC_RST_CLRD; + if (in->in_status == IN_MSG_RECEIVED) { + na->na_flags |= NAFC_TVALID; + na->na_response = 0; /* XXX SUCCEEDED XXX */ } na->na_header.rqs_entry_type = RQSTYPE_NOTIFY_ACK; na->na_header.rqs_entry_count = 1; if (ISP_CAP_2KLOGIN(isp)) { - isp_put_notify_ack_fc_e(isp, (na_fcentry_e_t *) na, (na_fcentry_e_t *)outp); + isp_put_notify_ack_fc_e(isp, (na_fcentry_e_t *)na, + (na_fcentry_e_t *)outp); } else { isp_put_notify_ack_fc(isp, na, (na_fcentry_t *)outp); } @@ -1415,27 +1410,28 @@ isp_handle_24xx_inotify(ispsoftc_t *isp, hichan = chan + 1; } isp_prt(isp, ISP_LOGTDEBUG1, "%s: Immediate Notify Channels %d..%d status=0x%x seqid=0x%x", __func__, lochan, hichan-1, inot_24xx->in_status, inot_24xx->in_rxid); - for (chan = lochan; chan < hichan; chan++) { - if (FCPARAM(isp, chan)->role == ISP_ROLE_NONE) - continue; - switch (inot_24xx->in_status) { - case IN24XX_LIP_RESET: - case IN24XX_LINK_RESET: - case IN24XX_PORT_LOGOUT: - case IN24XX_PORT_CHANGED: - case IN24XX_LINK_FAILED: - case IN24XX_SRR_RCVD: - case IN24XX_ELS_RCVD: - inot_24xx->in_reserved = 0; /* clear this for later usage */ + switch (inot_24xx->in_status) { + case IN24XX_LIP_RESET: + case IN24XX_LINK_RESET: + case IN24XX_PORT_LOGOUT: + case IN24XX_PORT_CHANGED: + case IN24XX_LINK_FAILED: + case IN24XX_SRR_RCVD: + case IN24XX_ELS_RCVD: + for (chan = lochan; chan < hichan; chan++) { + if (FCPARAM(isp, chan)->role == ISP_ROLE_NONE) + continue; + inot_24xx->in_reserved = 0; /* clear this for later usage */ inot_24xx->in_vpidx = chan; isp_async(isp, ISPASYNC_TARGET_ACTION, inot_24xx); - break; - default: - isp_prt(isp, ISP_LOGINFO, "%s: unhandled status (0x%x) for chan %d", __func__, inot_24xx->in_status, chan); - isp_async(isp, ISPASYNC_TARGET_NOTIFY_ACK, inot_24xx); - break; } + inot_24xx->in_vpidx = ochan; + break; + default: + isp_prt(isp, ISP_LOGINFO, "%s: unhandled status (0x%x) for chan %d", + __func__, inot_24xx->in_status, chan); + isp_async(isp, ISPASYNC_TARGET_NOTIFY_ACK, inot_24xx); + break; } - inot_24xx->in_vpidx = ochan; } #endif From owner-svn-src-stable-10@freebsd.org Wed Mar 29 15:56:59 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3567AD230E2; Wed, 29 Mar 2017 15:56:59 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0FF1467B20; Wed, 29 Mar 2017 15:56:58 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2TFuwGh051076; Wed, 29 Mar 2017 15:56:58 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2TFuwau051074; Wed, 29 Mar 2017 15:56:58 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201703291556.v2TFuwau051074@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 29 Mar 2017 15:56:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r316153 - stable/10/sys/dev/isp X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Mar 2017 15:56:59 -0000 Author: mav Date: Wed Mar 29 15:56:57 2017 New Revision: 316153 URL: https://svnweb.freebsd.org/changeset/base/316153 Log: MFC r315482: Use isp_target_put_entry() in places where it can be. This unifies the code and removes some duplication. Modified: stable/10/sys/dev/isp/isp_freebsd.c stable/10/sys/dev/isp/isp_target.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/isp/isp_freebsd.c ============================================================================== --- stable/10/sys/dev/isp/isp_freebsd.c Wed Mar 29 15:56:25 2017 (r316152) +++ stable/10/sys/dev/isp/isp_freebsd.c Wed Mar 29 15:56:57 2017 (r316153) @@ -1632,23 +1632,10 @@ isp_refire_notify_ack(void *arg) static void isp_target_putback_atio(union ccb *ccb) { - ispsoftc_t *isp; - struct ccb_scsiio *cso; - void *qe; + ispsoftc_t *isp = XS_ISP(ccb); + struct ccb_scsiio *cso = &ccb->csio; at2_entry_t local, *at = &local; - isp = XS_ISP(ccb); - - qe = isp_getrqentry(isp); - if (qe == NULL) { - xpt_print(ccb->ccb_h.path, - "%s: Request Queue Overflow\n", __func__); - callout_reset(&PISP_PCMD(ccb)->wdog, 10, - isp_refire_putback_atio, ccb); - return; - } - memset(qe, 0, QENTRY_LEN); - cso = &ccb->csio; ISP_MEMZERO(at, sizeof (at2_entry_t)); at->at_header.rqs_entry_type = RQSTYPE_ATIO2; at->at_header.rqs_entry_count = 1; @@ -1660,10 +1647,11 @@ isp_target_putback_atio(union ccb *ccb) at->at_status = CT_OK; at->at_rxid = cso->tag_id; at->at_iid = cso->ccb_h.target_id; - isp_put_atio2(isp, at, qe); - ISP_TDQE(isp, "isp_target_putback_atio", isp->isp_reqidx, qe); - ISP_SYNC_REQUEST(isp); - isp_complete_ctio(ccb); + if (isp_target_put_entry(isp, at)) { + callout_reset(&PISP_PCMD(ccb)->wdog, 10, + isp_refire_putback_atio, ccb); + } else + isp_complete_ctio(ccb); } static void Modified: stable/10/sys/dev/isp/isp_target.c ============================================================================== --- stable/10/sys/dev/isp/isp_target.c Wed Mar 29 15:56:25 2017 (r316152) +++ stable/10/sys/dev/isp/isp_target.c Wed Mar 29 15:56:57 2017 (r316153) @@ -421,22 +421,37 @@ isp_target_put_entry(ispsoftc_t *isp, vo return (-1); } switch (etype) { + case RQSTYPE_NOTIFY_ACK: + if (IS_24XX(isp)) + isp_put_notify_24xx_ack(isp, (na_fcentry_24xx_t *)ap, + (na_fcentry_24xx_t *)outp); + else if (ISP_CAP_2KLOGIN(isp)) + isp_put_notify_ack_fc_e(isp, (na_fcentry_e_t *)ap, + (na_fcentry_e_t *)outp); + else + isp_put_notify_ack_fc(isp, ap, (na_fcentry_t *)outp); + break; case RQSTYPE_ATIO2: - if (ISP_CAP_2KLOGIN(isp)) { - isp_put_atio2e(isp, (at2e_entry_t *) ap, (at2e_entry_t *) outp); - } else { - isp_put_atio2(isp, (at2_entry_t *) ap, (at2_entry_t *) outp); - } + if (ISP_CAP_2KLOGIN(isp)) + isp_put_atio2e(isp, (at2e_entry_t *)ap, + (at2e_entry_t *)outp); + else + isp_put_atio2(isp, (at2_entry_t *)ap, + (at2_entry_t *)outp); break; case RQSTYPE_CTIO2: - if (ISP_CAP_2KLOGIN(isp)) { - isp_put_ctio2e(isp, (ct2e_entry_t *) ap, (ct2e_entry_t *) outp); - } else { - isp_put_ctio2(isp, (ct2_entry_t *) ap, (ct2_entry_t *) outp); - } + if (ISP_CAP_2KLOGIN(isp)) + isp_put_ctio2e(isp, (ct2e_entry_t *)ap, + (ct2e_entry_t *)outp); + else + isp_put_ctio2(isp, (ct2_entry_t *)ap, + (ct2_entry_t *)outp); break; case RQSTYPE_CTIO7: - isp_put_ctio7(isp, (ct7_entry_t *) ap, (ct7_entry_t *) outp); + isp_put_ctio7(isp, (ct7_entry_t *)ap, (ct7_entry_t *)outp); + break; + case RQSTYPE_ABTS_RSP: + isp_put_abts_rsp(isp, (abts_rsp_t *)ap, (abts_rsp_t *)outp); break; default: isp_prt(isp, ISP_LOGERR, "%s: Unknown type 0x%x", __func__, etype); @@ -830,7 +845,6 @@ int isp_notify_ack(ispsoftc_t *isp, void *arg) { char storage[QENTRY_LEN]; - void *outp; /* * This is in case a Task Management Function ends up here. @@ -840,14 +854,7 @@ isp_notify_ack(ispsoftc_t *isp, void *ar return (isp_endcmd(isp, aep, NIL_HANDLE, 0, 0, 0)); } - outp = isp_getrqentry(isp); - if (outp == NULL) { - isp_prt(isp, ISP_LOGWARN, rqo, __func__); - return (1); - } - ISP_MEMZERO(storage, QENTRY_LEN); - if (IS_24XX(isp)) { in_fcentry_24xx_t *in = arg; na_fcentry_24xx_t *na = (na_fcentry_24xx_t *) storage; @@ -881,7 +888,6 @@ isp_notify_ack(ispsoftc_t *isp, void *ar na->na_srr_reject_explanation = 0x2a; } } - isp_put_notify_24xx_ack(isp, na, (na_fcentry_24xx_t *)outp); } else { in_fcentry_t *in = arg; na_fcentry_t *na = (na_fcentry_t *) storage; @@ -908,18 +914,10 @@ isp_notify_ack(ispsoftc_t *isp, void *ar } na->na_header.rqs_entry_type = RQSTYPE_NOTIFY_ACK; na->na_header.rqs_entry_count = 1; - if (ISP_CAP_2KLOGIN(isp)) { - isp_put_notify_ack_fc_e(isp, (na_fcentry_e_t *)na, - (na_fcentry_e_t *)outp); - } else { - isp_put_notify_ack_fc(isp, na, (na_fcentry_t *)outp); - } isp_prt(isp, ISP_LOGTDEBUG0, "notify ack handle %x seqid %x flags %x tflags %x response %x", iid, na->na_seqid, na->na_flags, na->na_task_flags, na->na_response); } - ISP_TDQE(isp, "isp_notify_ack", isp->isp_reqidx, storage); - ISP_SYNC_REQUEST(isp); - return (0); + return (isp_target_put_entry(isp, &storage)); } int @@ -930,7 +928,6 @@ isp_acknak_abts(ispsoftc_t *isp, void *a uint8_t tmpb; abts_t *abts = arg; abts_rsp_t *rsp = (abts_rsp_t *) storage; - void *outp; if (!IS_24XX(isp)) { isp_prt(isp, ISP_LOGERR, "%s: called for non-24XX card", __func__); @@ -942,12 +939,6 @@ isp_acknak_abts(ispsoftc_t *isp, void *a return (0); } - outp = isp_getrqentry(isp); - if (outp == NULL) { - isp_prt(isp, ISP_LOGWARN, rqo, __func__); - return (1); - } - ISP_MEMCPY(rsp, abts, QENTRY_LEN); rsp->abts_rsp_header.rqs_entry_type = RQSTYPE_ABTS_RSP; @@ -990,15 +981,7 @@ isp_acknak_abts(ispsoftc_t *isp, void *a break; } } - - /* - * The caller will have set response values as appropriate - * in the ABTS structure just before calling us. - */ - isp_put_abts_rsp(isp, rsp, (abts_rsp_t *)outp); - ISP_TDQE(isp, "isp_acknak_abts", isp->isp_reqidx, storage); - ISP_SYNC_REQUEST(isp); - return (0); + return (isp_target_put_entry(isp, rsp)); } static void From owner-svn-src-stable-10@freebsd.org Wed Mar 29 15:58:27 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3BD1BD23239; Wed, 29 Mar 2017 15:58:27 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0C76667C0D; Wed, 29 Mar 2017 15:58:26 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2TFwQpm051240; Wed, 29 Mar 2017 15:58:26 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2TFwP8S051236; Wed, 29 Mar 2017 15:58:25 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201703291558.v2TFwP8S051236@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 29 Mar 2017 15:58:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r316155 - stable/10/sys/dev/isp X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Mar 2017 15:58:27 -0000 Author: mav Date: Wed Mar 29 15:58:25 2017 New Revision: 316155 URL: https://svnweb.freebsd.org/changeset/base/316155 Log: MFC r315485: Remove dead remnants of SPI target. Modified: stable/10/sys/dev/isp/isp.c stable/10/sys/dev/isp/isp_library.c stable/10/sys/dev/isp/isp_library.h stable/10/sys/dev/isp/isp_target.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/isp/isp.c ============================================================================== --- stable/10/sys/dev/isp/isp.c Wed Mar 29 15:57:50 2017 (r316154) +++ stable/10/sys/dev/isp/isp.c Wed Mar 29 15:58:25 2017 (r316155) @@ -5989,8 +5989,6 @@ isp_handle_other_response(ispsoftc_t *is return (1); case RQSTYPE_ATIO: case RQSTYPE_CTIO: - case RQSTYPE_ENABLE_LUN: - case RQSTYPE_MODIFY_LUN: case RQSTYPE_NOTIFY: case RQSTYPE_NOTIFY_ACK: case RQSTYPE_CTIO1: Modified: stable/10/sys/dev/isp/isp_library.c ============================================================================== --- stable/10/sys/dev/isp/isp_library.c Wed Mar 29 15:57:50 2017 (r316154) +++ stable/10/sys/dev/isp/isp_library.c Wed Mar 29 15:58:25 2017 (r316155) @@ -3055,78 +3055,6 @@ isp_get_ctio7(ispsoftc_t *isp, ct7_entry } void -isp_put_enable_lun(ispsoftc_t *isp, lun_entry_t *lesrc, lun_entry_t *ledst) -{ - int i; - isp_put_hdr(isp, &lesrc->le_header, &ledst->le_header); - ISP_IOXPUT_32(isp, lesrc->le_reserved, &ledst->le_reserved); - if (ISP_IS_SBUS(isp)) { - ISP_IOXPUT_8(isp, lesrc->le_lun, &ledst->le_rsvd); - ISP_IOXPUT_8(isp, lesrc->le_rsvd, &ledst->le_lun); - ISP_IOXPUT_8(isp, lesrc->le_ops, &ledst->le_tgt); - ISP_IOXPUT_8(isp, lesrc->le_tgt, &ledst->le_ops); - ISP_IOXPUT_8(isp, lesrc->le_status, &ledst->le_reserved2); - ISP_IOXPUT_8(isp, lesrc->le_reserved2, &ledst->le_status); - ISP_IOXPUT_8(isp, lesrc->le_cmd_count, &ledst->le_in_count); - ISP_IOXPUT_8(isp, lesrc->le_in_count, &ledst->le_cmd_count); - ISP_IOXPUT_8(isp, lesrc->le_cdb6len, &ledst->le_cdb7len); - ISP_IOXPUT_8(isp, lesrc->le_cdb7len, &ledst->le_cdb6len); - } else { - ISP_IOXPUT_8(isp, lesrc->le_lun, &ledst->le_lun); - ISP_IOXPUT_8(isp, lesrc->le_rsvd, &ledst->le_rsvd); - ISP_IOXPUT_8(isp, lesrc->le_ops, &ledst->le_ops); - ISP_IOXPUT_8(isp, lesrc->le_tgt, &ledst->le_tgt); - ISP_IOXPUT_8(isp, lesrc->le_status, &ledst->le_status); - ISP_IOXPUT_8(isp, lesrc->le_reserved2, &ledst->le_reserved2); - ISP_IOXPUT_8(isp, lesrc->le_cmd_count, &ledst->le_cmd_count); - ISP_IOXPUT_8(isp, lesrc->le_in_count, &ledst->le_in_count); - ISP_IOXPUT_8(isp, lesrc->le_cdb6len, &ledst->le_cdb6len); - ISP_IOXPUT_8(isp, lesrc->le_cdb7len, &ledst->le_cdb7len); - } - ISP_IOXPUT_32(isp, lesrc->le_flags, &ledst->le_flags); - ISP_IOXPUT_16(isp, lesrc->le_timeout, &ledst->le_timeout); - for (i = 0; i < 20; i++) { - ISP_IOXPUT_8(isp, lesrc->le_reserved3[i], &ledst->le_reserved3[i]); - } -} - -void -isp_get_enable_lun(ispsoftc_t *isp, lun_entry_t *lesrc, lun_entry_t *ledst) -{ - int i; - isp_get_hdr(isp, &lesrc->le_header, &ledst->le_header); - ISP_IOXGET_32(isp, &lesrc->le_reserved, ledst->le_reserved); - if (ISP_IS_SBUS(isp)) { - ISP_IOXGET_8(isp, &lesrc->le_lun, ledst->le_rsvd); - ISP_IOXGET_8(isp, &lesrc->le_rsvd, ledst->le_lun); - ISP_IOXGET_8(isp, &lesrc->le_ops, ledst->le_tgt); - ISP_IOXGET_8(isp, &lesrc->le_tgt, ledst->le_ops); - ISP_IOXGET_8(isp, &lesrc->le_status, ledst->le_reserved2); - ISP_IOXGET_8(isp, &lesrc->le_reserved2, ledst->le_status); - ISP_IOXGET_8(isp, &lesrc->le_cmd_count, ledst->le_in_count); - ISP_IOXGET_8(isp, &lesrc->le_in_count, ledst->le_cmd_count); - ISP_IOXGET_8(isp, &lesrc->le_cdb6len, ledst->le_cdb7len); - ISP_IOXGET_8(isp, &lesrc->le_cdb7len, ledst->le_cdb6len); - } else { - ISP_IOXGET_8(isp, &lesrc->le_lun, ledst->le_lun); - ISP_IOXGET_8(isp, &lesrc->le_rsvd, ledst->le_rsvd); - ISP_IOXGET_8(isp, &lesrc->le_ops, ledst->le_ops); - ISP_IOXGET_8(isp, &lesrc->le_tgt, ledst->le_tgt); - ISP_IOXGET_8(isp, &lesrc->le_status, ledst->le_status); - ISP_IOXGET_8(isp, &lesrc->le_reserved2, ledst->le_reserved2); - ISP_IOXGET_8(isp, &lesrc->le_cmd_count, ledst->le_cmd_count); - ISP_IOXGET_8(isp, &lesrc->le_in_count, ledst->le_in_count); - ISP_IOXGET_8(isp, &lesrc->le_cdb6len, ledst->le_cdb6len); - ISP_IOXGET_8(isp, &lesrc->le_cdb7len, ledst->le_cdb7len); - } - ISP_IOXGET_32(isp, &lesrc->le_flags, ledst->le_flags); - ISP_IOXGET_16(isp, &lesrc->le_timeout, ledst->le_timeout); - for (i = 0; i < 20; i++) { - ISP_IOXGET_8(isp, &lesrc->le_reserved3[i], ledst->le_reserved3[i]); - } -} - -void isp_put_notify_fc(ispsoftc_t *isp, in_fcentry_t *src, in_fcentry_t *dst) { isp_put_hdr(isp, &src->in_header, &dst->in_header); Modified: stable/10/sys/dev/isp/isp_library.h ============================================================================== --- stable/10/sys/dev/isp/isp_library.h Wed Mar 29 15:57:50 2017 (r316154) +++ stable/10/sys/dev/isp/isp_library.h Wed Mar 29 15:58:25 2017 (r316155) @@ -181,8 +181,6 @@ void isp_put_ctio7(ispsoftc_t *, ct7_ent void isp_get_ctio2(ispsoftc_t *, ct2_entry_t *, ct2_entry_t *); void isp_get_ctio2e(ispsoftc_t *, ct2e_entry_t *, ct2e_entry_t *); void isp_get_ctio7(ispsoftc_t *, ct7_entry_t *, ct7_entry_t *); -void isp_put_enable_lun(ispsoftc_t *, lun_entry_t *, lun_entry_t *); -void isp_get_enable_lun(ispsoftc_t *, lun_entry_t *, lun_entry_t *); void isp_put_notify_fc(ispsoftc_t *, in_fcentry_t *, in_fcentry_t *); void isp_put_notify_fc_e(ispsoftc_t *, in_fcentry_e_t *, in_fcentry_e_t *); void isp_put_notify_24xx(ispsoftc_t *, in_fcentry_24xx_t *, in_fcentry_24xx_t *); Modified: stable/10/sys/dev/isp/isp_target.c ============================================================================== --- stable/10/sys/dev/isp/isp_target.c Wed Mar 29 15:57:50 2017 (r316154) +++ stable/10/sys/dev/isp/isp_target.c Wed Mar 29 15:58:25 2017 (r316155) @@ -215,12 +215,6 @@ isp_target_notify(ispsoftc_t *isp, void isp_handle_ctio7(isp, (ct7_entry_t *) local); break; - case RQSTYPE_ENABLE_LUN: - case RQSTYPE_MODIFY_LUN: - isp_get_enable_lun(isp, lunenp, (lun_entry_t *) local); - isp_async(isp, ISPASYNC_TARGET_ACTION, local); - break; - case RQSTYPE_NOTIFY: bus = 0; if (IS_24XX(isp)) { From owner-svn-src-stable-10@freebsd.org Wed Mar 29 16:02:52 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 84D45D23521; Wed, 29 Mar 2017 16:02:52 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5CDB169318; Wed, 29 Mar 2017 16:02:52 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2TG2pHo055101; Wed, 29 Mar 2017 16:02:51 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2TG2p18055097; Wed, 29 Mar 2017 16:02:51 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201703291602.v2TG2p18055097@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 29 Mar 2017 16:02:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r316157 - stable/10/sys/dev/isp X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Mar 2017 16:02:52 -0000 Author: mav Date: Wed Mar 29 16:02:50 2017 New Revision: 316157 URL: https://svnweb.freebsd.org/changeset/base/316157 Log: MFC r315488: Extend nt_lun to full 8 byte. Modified: stable/10/sys/dev/isp/isp_freebsd.c stable/10/sys/dev/isp/isp_target.c stable/10/sys/dev/isp/isp_target.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/isp/isp_freebsd.c ============================================================================== --- stable/10/sys/dev/isp/isp_freebsd.c Wed Mar 29 16:02:19 2017 (r316156) +++ stable/10/sys/dev/isp/isp_freebsd.c Wed Mar 29 16:02:50 2017 (r316157) @@ -2303,7 +2303,8 @@ isp_handle_platform_notify_fc(ispsoftc_t break; case IN_ABORT_TASK: { - uint16_t nphdl, lun; + lun_id_t lun; + uint16_t nphdl; uint32_t sid; uint64_t wwn; fcportdb_t *lp; @@ -2602,7 +2603,7 @@ isp_handle_platform_target_tmf(ispsoftc_ inot_private_data_t *ntp = NULL; lun_id_t lun; - isp_prt(isp, ISP_LOGTDEBUG0, "%s: code 0x%x sid 0x%x tagval 0x%016llx chan %d lun 0x%x", __func__, notify->nt_ncode, + isp_prt(isp, ISP_LOGTDEBUG0, "%s: code 0x%x sid 0x%x tagval 0x%016llx chan %d lun %jx", __func__, notify->nt_ncode, notify->nt_sid, (unsigned long long) notify->nt_tagval, notify->nt_channel, notify->nt_lun); /* * NB: This assignment is necessary because of tricky type conversion. Modified: stable/10/sys/dev/isp/isp_target.c ============================================================================== --- stable/10/sys/dev/isp/isp_target.c Wed Mar 29 16:02:19 2017 (r316156) +++ stable/10/sys/dev/isp/isp_target.c Wed Mar 29 16:02:50 2017 (r316157) @@ -709,8 +709,8 @@ static void isp_got_msg_fc(ispsoftc_t *isp, in_fcentry_t *inp) { isp_notify_t notify; - static const char f1[] = "%s from N-port handle 0x%x lun %x seq 0x%x"; - static const char f2[] = "unknown %s 0x%x lun %x N-Port handle 0x%x task flags 0x%x seq 0x%x\n"; + static const char f1[] = "%s from N-port handle 0x%x lun %jx seq 0x%x"; + static const char f2[] = "unknown %s 0x%x lun %jx N-Port handle 0x%x task flags 0x%x seq 0x%x\n"; uint16_t seqid, nphdl; ISP_MEMZERO(¬ify, sizeof (isp_notify_t)); @@ -772,8 +772,8 @@ static void isp_got_tmf_24xx(ispsoftc_t *isp, at7_entry_t *aep) { isp_notify_t notify; - static const char f1[] = "%s from PortID 0x%06x lun %x seq 0x%08x"; - static const char f2[] = "unknown Task Flag 0x%x lun %x PortID 0x%x tag 0x%08x"; + static const char f1[] = "%s from PortID 0x%06x lun %jx seq 0x%08x"; + static const char f2[] = "unknown Task Flag 0x%x lun %jx PortID 0x%x tag 0x%08x"; fcportdb_t *lp; uint16_t chan; uint32_t sid, did; @@ -781,7 +781,7 @@ isp_got_tmf_24xx(ispsoftc_t *isp, at7_en ISP_MEMZERO(¬ify, sizeof (isp_notify_t)); notify.nt_hba = isp; notify.nt_wwn = INI_ANY; - notify.nt_lun = (aep->at_cmnd.fcp_cmnd_lun[0] << 8) | (aep->at_cmnd.fcp_cmnd_lun[1]); + notify.nt_lun = CAM_EXTLUN_BYTE_SWIZZLE(be64dec(aep->at_cmnd.fcp_cmnd_lun)); notify.nt_tagval = aep->at_rxid; notify.nt_tagval |= (((uint64_t)(isp->isp_serno++)) << 32); notify.nt_lreserved = aep; Modified: stable/10/sys/dev/isp/isp_target.h ============================================================================== --- stable/10/sys/dev/isp/isp_target.h Wed Mar 29 16:02:19 2017 (r316156) +++ stable/10/sys/dev/isp/isp_target.h Wed Mar 29 16:02:50 2017 (r316157) @@ -64,16 +64,15 @@ typedef struct isp_notify { uint64_t nt_wwn; /* source (wwn) */ uint64_t nt_tgt; /* destination (wwn) */ uint64_t nt_tagval; /* tag value */ + lun_id_t nt_lun; /* logical unit */ uint32_t nt_sid : 24; /* source port id */ uint32_t nt_failed : 1, /* notify operation failed */ nt_need_ack : 1, /* this notify needs an ACK */ nt_did : 24; /* destination port id */ - uint32_t - nt_lun : 16, /* logical unit */ - nt_nphdl : 16; /* n-port handle */ - uint8_t nt_channel; /* channel id */ + uint16_t nt_nphdl; /* n-port handle */ + uint8_t nt_channel; /* channel id */ isp_ncode_t nt_ncode; /* action */ } isp_notify_t; #define MATCH_TMD(tmd, iid, lun, tag) \ From owner-svn-src-stable-10@freebsd.org Wed Mar 29 16:04:04 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3595FD2361F; Wed, 29 Mar 2017 16:04:04 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EBAA56972C; Wed, 29 Mar 2017 16:04:03 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2TG439R055255; Wed, 29 Mar 2017 16:04:03 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2TG42jH055253; Wed, 29 Mar 2017 16:04:02 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201703291604.v2TG42jH055253@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 29 Mar 2017 16:04:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r316159 - stable/10/sys/dev/isp X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Mar 2017 16:04:04 -0000 Author: mav Date: Wed Mar 29 16:04:02 2017 New Revision: 316159 URL: https://svnweb.freebsd.org/changeset/base/316159 Log: MFC r315489: Move RQSTYPE_ABTS_RCVD parsing into generic code. Modified: stable/10/sys/dev/isp/isp_freebsd.c stable/10/sys/dev/isp/isp_target.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/isp/isp_freebsd.c ============================================================================== --- stable/10/sys/dev/isp/isp_freebsd.c Wed Mar 29 16:03:33 2017 (r316158) +++ stable/10/sys/dev/isp/isp_freebsd.c Wed Mar 29 16:04:02 2017 (r316159) @@ -2601,18 +2601,19 @@ isp_handle_platform_target_tmf(ispsoftc_ fcportdb_t *lp; struct ccb_immediate_notify *inot; inot_private_data_t *ntp = NULL; + atio_private_data_t *atp; lun_id_t lun; isp_prt(isp, ISP_LOGTDEBUG0, "%s: code 0x%x sid 0x%x tagval 0x%016llx chan %d lun %jx", __func__, notify->nt_ncode, notify->nt_sid, (unsigned long long) notify->nt_tagval, notify->nt_channel, notify->nt_lun); - /* - * NB: This assignment is necessary because of tricky type conversion. - * XXX: This is tricky and I need to check this. If the lun isn't known - * XXX: for the task management function, it does not of necessity follow - * XXX: that it should go up stream to the wildcard listener. - */ if (notify->nt_lun == LUN_ANY) { - lun = CAM_LUN_WILDCARD; + if (notify->nt_tagval == TAG_ANY) { + lun = CAM_LUN_WILDCARD; + } else { + atp = isp_find_atpd(isp, notify->nt_channel, + notify->nt_tagval & 0xffffffff); + lun = atp ? atp->lun : CAM_LUN_WILDCARD; + } } else { lun = notify->nt_lun; } @@ -4175,55 +4176,6 @@ changed: case RQSTYPE_CTIO: isp_handle_platform_ctio(isp, hp); break; - case RQSTYPE_ABTS_RCVD: - { - abts_t *abts = (abts_t *)hp; - isp_notify_t notify, *nt = ¬ify; - atio_private_data_t *atp; - fcportdb_t *lp; - uint16_t chan; - uint32_t sid, did; - - did = (abts->abts_did_hi << 16) | abts->abts_did_lo; - sid = (abts->abts_sid_hi << 16) | abts->abts_sid_lo; - ISP_MEMZERO(nt, sizeof (isp_notify_t)); - - nt->nt_hba = isp; - nt->nt_did = did; - nt->nt_nphdl = abts->abts_nphdl; - nt->nt_sid = sid; - isp_find_chan_by_did(isp, did, &chan); - if (chan == ISP_NOCHAN) { - nt->nt_tgt = TGT_ANY; - } else { - nt->nt_tgt = FCPARAM(isp, chan)->isp_wwpn; - if (isp_find_pdb_by_handle(isp, chan, abts->abts_nphdl, &lp)) { - nt->nt_wwn = lp->port_wwn; - } else { - nt->nt_wwn = INI_ANY; - } - } - /* - * Try hard to find the lun for this command. - */ - atp = isp_find_atpd(isp, chan, abts->abts_rxid_task); - nt->nt_lun = atp ? atp->lun : LUN_ANY; - nt->nt_need_ack = 1; - nt->nt_tagval = abts->abts_rxid_task; - nt->nt_tagval |= (((uint64_t) abts->abts_rxid_abts) << 32); - if (abts->abts_rxid_task == ISP24XX_NO_TASK) { - isp_prt(isp, ISP_LOGTINFO, "[0x%x] ABTS from N-Port handle 0x%x Port 0x%06x has no task id (rx_id 0x%04x ox_id 0x%04x)", - abts->abts_rxid_abts, abts->abts_nphdl, sid, abts->abts_rx_id, abts->abts_ox_id); - } else { - isp_prt(isp, ISP_LOGTINFO, "[0x%x] ABTS from N-Port handle 0x%x Port 0x%06x for task 0x%x (rx_id 0x%04x ox_id 0x%04x)", - abts->abts_rxid_abts, abts->abts_nphdl, sid, abts->abts_rxid_task, abts->abts_rx_id, abts->abts_ox_id); - } - nt->nt_channel = chan; - nt->nt_ncode = NT_ABORT_TASK; - nt->nt_lreserved = hp; - isp_handle_platform_target_tmf(isp, nt); - break; - } } break; } Modified: stable/10/sys/dev/isp/isp_target.c ============================================================================== --- stable/10/sys/dev/isp/isp_target.c Wed Mar 29 16:03:33 2017 (r316158) +++ stable/10/sys/dev/isp/isp_target.c Wed Mar 29 16:04:02 2017 (r316159) @@ -58,6 +58,7 @@ static const char rqo[] = "%s: Request Q static void isp_got_msg_fc(ispsoftc_t *, in_fcentry_t *); static void isp_got_tmf_24xx(ispsoftc_t *, at7_entry_t *); +static void isp_handle_abts(ispsoftc_t *, abts_t *); static void isp_handle_atio2(ispsoftc_t *, at2_entry_t *); static void isp_handle_ctio2(ispsoftc_t *, ct2_entry_t *); static void isp_handle_ctio7(ispsoftc_t *, ct7_entry_t *); @@ -361,7 +362,7 @@ isp_target_notify(ispsoftc_t *isp, void case RQSTYPE_ABTS_RCVD: isp_get_abts(isp, abts, (abts_t *)local); - isp_async(isp, ISPASYNC_TARGET_ACTION, &local); + isp_handle_abts(isp, (abts_t *)local); break; case RQSTYPE_ABTS_RSP: isp_get_abts_rsp(isp, abts_rsp, (abts_rsp_t *)local); @@ -979,6 +980,47 @@ isp_acknak_abts(ispsoftc_t *isp, void *a } static void +isp_handle_abts(ispsoftc_t *isp, abts_t *abts) +{ + isp_notify_t notify, *nt = ¬ify; + fcportdb_t *lp; + uint16_t chan; + uint32_t sid, did; + + did = (abts->abts_did_hi << 16) | abts->abts_did_lo; + sid = (abts->abts_sid_hi << 16) | abts->abts_sid_lo; + ISP_MEMZERO(nt, sizeof (isp_notify_t)); + + nt->nt_hba = isp; + nt->nt_did = did; + nt->nt_nphdl = abts->abts_nphdl; + nt->nt_sid = sid; + isp_find_chan_by_did(isp, did, &chan); + if (chan == ISP_NOCHAN) { + nt->nt_tgt = TGT_ANY; + } else { + nt->nt_tgt = FCPARAM(isp, chan)->isp_wwpn; + if (isp_find_pdb_by_handle(isp, chan, abts->abts_nphdl, &lp)) { + nt->nt_wwn = lp->port_wwn; + } else { + nt->nt_wwn = INI_ANY; + } + } + nt->nt_lun = LUN_ANY; + nt->nt_need_ack = 1; + nt->nt_tagval = abts->abts_rxid_task; + nt->nt_tagval |= (((uint64_t) abts->abts_rxid_abts) << 32); + isp_prt(isp, ISP_LOGTINFO, "[0x%x] ABTS from N-Port handle 0x%x" + " Port 0x%06x for task 0x%x (rx_id 0x%04x ox_id 0x%04x)", + abts->abts_rxid_abts, abts->abts_nphdl, sid, abts->abts_rxid_task, + abts->abts_rx_id, abts->abts_ox_id); + nt->nt_channel = chan; + nt->nt_ncode = NT_ABORT_TASK; + nt->nt_lreserved = abts; + isp_async(isp, ISPASYNC_TARGET_NOTIFY, ¬ify); +} + +static void isp_handle_atio2(ispsoftc_t *isp, at2_entry_t *aep) { int lun, iid; From owner-svn-src-stable-10@freebsd.org Wed Mar 29 16:04:43 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E34EED236A5; Wed, 29 Mar 2017 16:04:43 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A586E6977F; Wed, 29 Mar 2017 16:04:43 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2TG4gBJ055330; Wed, 29 Mar 2017 16:04:42 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2TG4gb9055328; Wed, 29 Mar 2017 16:04:42 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201703291604.v2TG4gb9055328@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 29 Mar 2017 16:04:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r316160 - stable/10/sys/dev/isp X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Mar 2017 16:04:44 -0000 Author: mav Date: Wed Mar 29 16:04:42 2017 New Revision: 316160 URL: https://svnweb.freebsd.org/changeset/base/316160 Log: MFC r315507: Reorganize RQSTYPE_NOTIFY handling for chips <= 23xx. There were two copies of the code: one in generic code was half-broken, and another in platform code was never called. Leave only one in generic code and working. Modified: stable/10/sys/dev/isp/isp_freebsd.c stable/10/sys/dev/isp/isp_target.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/isp/isp_freebsd.c ============================================================================== --- stable/10/sys/dev/isp/isp_freebsd.c Wed Mar 29 16:04:02 2017 (r316159) +++ stable/10/sys/dev/isp/isp_freebsd.c Wed Mar 29 16:04:42 2017 (r316160) @@ -788,7 +788,6 @@ static void isp_target_start_ctio(ispsof static void isp_handle_platform_atio2(ispsoftc_t *, at2_entry_t *); static void isp_handle_platform_atio7(ispsoftc_t *, at7_entry_t *); static void isp_handle_platform_ctio(ispsoftc_t *, void *); -static void isp_handle_platform_notify_fc(ispsoftc_t *, in_fcentry_t *); static void isp_handle_platform_notify_24xx(ispsoftc_t *, in_fcentry_24xx_t *); static int isp_handle_platform_target_notify_ack(ispsoftc_t *, isp_notify_t *, uint32_t rsp); static void isp_handle_platform_target_tmf(ispsoftc_t *, isp_notify_t *); @@ -2283,80 +2282,6 @@ isp_handle_platform_ctio(ispsoftc_t *isp } static void -isp_handle_platform_notify_fc(ispsoftc_t *isp, in_fcentry_t *inp) -{ - int needack = 1; - switch (inp->in_status) { - case IN_PORT_LOGOUT: - /* - * XXX: Need to delete this initiator's WWN from the database - * XXX: Need to send this LOGOUT upstream - */ - isp_prt(isp, ISP_LOGWARN, "port logout of S_ID 0x%x", inp->in_iid); - break; - case IN_PORT_CHANGED: - isp_prt(isp, ISP_LOGWARN, "port changed for S_ID 0x%x", inp->in_iid); - break; - case IN_GLOBAL_LOGO: - isp_del_all_wwn_entries(isp, 0); - isp_prt(isp, ISP_LOGINFO, "all ports logged out"); - break; - case IN_ABORT_TASK: - { - lun_id_t lun; - uint16_t nphdl; - uint32_t sid; - uint64_t wwn; - fcportdb_t *lp; - isp_notify_t tmp, *nt = &tmp; - - if (ISP_CAP_SCCFW(isp)) { - lun = inp->in_scclun; - } else { - lun = inp->in_lun; - } - if (ISP_CAP_2KLOGIN(isp)) { - nphdl = ((in_fcentry_e_t *)inp)->in_iid; - } else { - nphdl = inp->in_iid; - } - if (isp_find_pdb_by_handle(isp, 0, nphdl, &lp)) { - wwn = lp->port_wwn; - sid = lp->portid; - } else { - wwn = INI_ANY; - sid = PORT_ANY; - } - isp_prt(isp, ISP_LOGTDEBUG0, "ABORT TASK RX_ID %x WWN 0x%016llx", - inp->in_seqid, (unsigned long long) wwn); - - ISP_MEMZERO(nt, sizeof (isp_notify_t)); - nt->nt_hba = isp; - nt->nt_tgt = FCPARAM(isp, 0)->isp_wwpn; - nt->nt_wwn = wwn; - nt->nt_nphdl = nphdl; - nt->nt_sid = sid; - nt->nt_did = PORT_ANY; - nt->nt_lun = lun; - nt->nt_tagval = inp->in_seqid; - nt->nt_tagval |= (((uint64_t)(isp->isp_serno++)) << 32); - nt->nt_need_ack = 1; - nt->nt_channel = 0; - nt->nt_ncode = NT_ABORT_TASK; - nt->nt_lreserved = inp; - isp_handle_platform_target_tmf(isp, nt); - needack = 0; - break; - } - default: - break; - } - if (needack) { - isp_async(isp, ISPASYNC_TARGET_NOTIFY_ACK, inp); - } -} - -static void isp_handle_platform_notify_24xx(ispsoftc_t *isp, in_fcentry_24xx_t *inot) { uint16_t nphdl; @@ -4158,11 +4083,7 @@ changed: isp_prt(isp, ISP_LOGWARN, "%s: unhandled target action 0x%x", __func__, hp->rqs_entry_type); break; case RQSTYPE_NOTIFY: - if (IS_24XX(isp)) { - isp_handle_platform_notify_24xx(isp, (in_fcentry_24xx_t *) hp); - } else { - isp_handle_platform_notify_fc(isp, (in_fcentry_t *) hp); - } + isp_handle_platform_notify_24xx(isp, (in_fcentry_24xx_t *) hp); break; case RQSTYPE_ATIO: isp_handle_platform_atio7(isp, (at7_entry_t *) hp); Modified: stable/10/sys/dev/isp/isp_target.c ============================================================================== --- stable/10/sys/dev/isp/isp_target.c Wed Mar 29 16:04:02 2017 (r316159) +++ stable/10/sys/dev/isp/isp_target.c Wed Mar 29 16:04:42 2017 (r316160) @@ -62,7 +62,8 @@ static void isp_handle_abts(ispsoftc_t * static void isp_handle_atio2(ispsoftc_t *, at2_entry_t *); static void isp_handle_ctio2(ispsoftc_t *, ct2_entry_t *); static void isp_handle_ctio7(ispsoftc_t *, ct7_entry_t *); -static void isp_handle_24xx_inotify(ispsoftc_t *, in_fcentry_24xx_t *); +static void isp_handle_notify(ispsoftc_t *, in_fcentry_t *); +static void isp_handle_notify_24xx(ispsoftc_t *, in_fcentry_24xx_t *); /* * The Qlogic driver gets an interrupt to look at response queue entries. @@ -113,8 +114,6 @@ static void isp_handle_24xx_inotify(isps int isp_target_notify(ispsoftc_t *isp, void *vptr, uint32_t *optrp) { - uint16_t status; - uint32_t seqid; union { at2_entry_t *at2iop; at2e_entry_t *at2eiop; @@ -153,9 +152,7 @@ isp_target_notify(ispsoftc_t *isp, void #define hdrp unp.hp } unp; uint8_t local[QENTRY_LEN]; - uint16_t iid; int bus, type, len, level, rval = 1; - isp_notify_t notify; type = isp_get_response_type(isp, (isphdr_t *)vptr); unp.vp = vptr; @@ -221,113 +218,14 @@ isp_target_notify(ispsoftc_t *isp, void if (IS_24XX(isp)) { isp_get_notify_24xx(isp, inot_24xx, (in_fcentry_24xx_t *)local); inot_24xx = (in_fcentry_24xx_t *) local; - isp_handle_24xx_inotify(isp, inot_24xx); - break; - } else { - if (ISP_CAP_2KLOGIN(isp)) { - in_fcentry_e_t *ecp = (in_fcentry_e_t *)local; - isp_get_notify_fc_e(isp, inote_fcp, ecp); - iid = ecp->in_iid; - status = ecp->in_status; - seqid = ecp->in_seqid; - } else { - in_fcentry_t *fcp = (in_fcentry_t *)local; - isp_get_notify_fc(isp, inot_fcp, fcp); - iid = fcp->in_iid; - status = fcp->in_status; - seqid = fcp->in_seqid; - } - } - - isp_prt(isp, ISP_LOGTDEBUG0, "Immediate Notify On Bus %d, status=0x%x seqid=0x%x", bus, status, seqid); - - switch (status) { - case IN_MSG_RECEIVED: - case IN_IDE_RECEIVED: - isp_got_msg_fc(isp, (in_fcentry_t *)local); - break; - case IN_RSRC_UNAVAIL: - isp_prt(isp, ISP_LOGINFO, "Firmware out of ATIOs"); - isp_async(isp, ISPASYNC_TARGET_NOTIFY_ACK, local); - break; - - case IN_RESET: - ISP_MEMZERO(¬ify, sizeof (isp_notify_t)); - notify.nt_hba = isp; - notify.nt_wwn = INI_ANY; - notify.nt_tgt = TGT_ANY; - notify.nt_nphdl = iid; - notify.nt_sid = PORT_ANY; - notify.nt_did = PORT_ANY; - notify.nt_lun = LUN_ANY; - notify.nt_tagval = TAG_ANY; - notify.nt_tagval |= (((uint64_t)(isp->isp_serno++)) << 32); - notify.nt_ncode = NT_BUS_RESET; - notify.nt_need_ack = 1; - notify.nt_lreserved = local; - isp_async(isp, ISPASYNC_TARGET_NOTIFY, ¬ify); - break; - - case IN_PORT_LOGOUT: - ISP_MEMZERO(¬ify, sizeof (isp_notify_t)); - notify.nt_hba = isp; - notify.nt_wwn = INI_ANY; - notify.nt_nphdl = iid; - notify.nt_sid = PORT_ANY; - notify.nt_did = PORT_ANY; - notify.nt_ncode = NT_LOGOUT; - notify.nt_need_ack = 1; - notify.nt_lreserved = local; - isp_async(isp, ISPASYNC_TARGET_NOTIFY, ¬ify); - break; - - case IN_ABORT_TASK: - ISP_MEMZERO(¬ify, sizeof (isp_notify_t)); - notify.nt_hba = isp; - notify.nt_wwn = INI_ANY; - notify.nt_nphdl = iid; - notify.nt_sid = PORT_ANY; - notify.nt_did = PORT_ANY; - notify.nt_ncode = NT_ABORT_TASK; - notify.nt_need_ack = 1; - notify.nt_lreserved = local; - isp_async(isp, ISPASYNC_TARGET_NOTIFY, ¬ify); - break; - - case IN_GLOBAL_LOGO: - isp_prt(isp, ISP_LOGTINFO, "%s: all ports logged out", __func__); - ISP_MEMZERO(¬ify, sizeof (isp_notify_t)); - notify.nt_hba = isp; - notify.nt_wwn = INI_ANY; - notify.nt_nphdl = NIL_HANDLE; - notify.nt_sid = PORT_ANY; - notify.nt_did = PORT_ANY; - notify.nt_ncode = NT_GLOBAL_LOGOUT; - notify.nt_need_ack = 1; - notify.nt_lreserved = local; - isp_async(isp, ISPASYNC_TARGET_NOTIFY, ¬ify); - break; - - case IN_PORT_CHANGED: - isp_prt(isp, ISP_LOGTINFO, "%s: port changed", __func__); - ISP_MEMZERO(¬ify, sizeof (isp_notify_t)); - notify.nt_hba = isp; - notify.nt_wwn = INI_ANY; - notify.nt_nphdl = NIL_HANDLE; - notify.nt_sid = PORT_ANY; - notify.nt_did = PORT_ANY; - notify.nt_ncode = NT_CHANGED; - notify.nt_need_ack = 1; - notify.nt_lreserved = local; - isp_async(isp, ISPASYNC_TARGET_NOTIFY, ¬ify); - break; - - default: - ISP_SNPRINTF(local, sizeof local, "%s: unknown status to RQSTYPE_NOTIFY (0x%x)", __func__, status); - isp_print_bytes(isp, local, QENTRY_LEN, vptr); - isp_async(isp, ISPASYNC_TARGET_NOTIFY_ACK, local); + isp_handle_notify_24xx(isp, inot_24xx); break; } + if (ISP_CAP_2KLOGIN(isp)) + isp_get_notify_fc_e(isp, inote_fcp, (in_fcentry_e_t *)local); + else + isp_get_notify_fc(isp, inot_fcp, (in_fcentry_t *)local); + isp_handle_notify(isp, (in_fcentry_t *)local); break; case RQSTYPE_NOTIFY_ACK: @@ -1405,7 +1303,84 @@ isp_handle_ctio7(ispsoftc_t *isp, ct7_en } static void -isp_handle_24xx_inotify(ispsoftc_t *isp, in_fcentry_24xx_t *inot_24xx) +isp_handle_notify(ispsoftc_t *isp, in_fcentry_t *inp) +{ + fcportdb_t *lp; + uint64_t wwn; + uint32_t sid; + uint16_t nphdl, status; + isp_notify_t notify; + + status = inp->in_status; + isp_prt(isp, ISP_LOGTDEBUG0, "Immediate Notify, status=0x%x seqid=0x%x", + status, inp->in_seqid); + switch (status) { + case IN_MSG_RECEIVED: + case IN_IDE_RECEIVED: + isp_got_msg_fc(isp, inp); + return; + case IN_RSRC_UNAVAIL: + isp_prt(isp, ISP_LOGINFO, "Firmware out of ATIOs"); + isp_async(isp, ISPASYNC_TARGET_NOTIFY_ACK, inp); + return; + } + + if (ISP_CAP_2KLOGIN(isp)) + nphdl = ((in_fcentry_e_t *)inp)->in_iid; + else + nphdl = inp->in_iid; + if (isp_find_pdb_by_handle(isp, 0, nphdl, &lp)) { + wwn = lp->port_wwn; + sid = lp->portid; + } else { + wwn = INI_ANY; + sid = PORT_ANY; + } + + ISP_MEMZERO(¬ify, sizeof (isp_notify_t)); + notify.nt_hba = isp; + notify.nt_wwn = wwn; + notify.nt_tgt = FCPARAM(isp, 0)->isp_wwpn; + notify.nt_nphdl = nphdl; + notify.nt_sid = sid; + notify.nt_did = PORT_ANY; + if (ISP_CAP_SCCFW(isp)) + notify.nt_lun = inp->in_scclun; + else + notify.nt_lun = inp->in_lun; + notify.nt_tagval = inp->in_seqid; + notify.nt_tagval |= (((uint64_t)(isp->isp_serno++)) << 32); + notify.nt_need_ack = 1; + notify.nt_channel = 0; + notify.nt_lreserved = inp; + + switch (status) { + case IN_RESET: + notify.nt_ncode = NT_BUS_RESET; + break; + case IN_PORT_LOGOUT: + notify.nt_ncode = NT_LOGOUT; + break; + case IN_ABORT_TASK: + notify.nt_ncode = NT_ABORT_TASK; + break; + case IN_GLOBAL_LOGO: + notify.nt_ncode = NT_GLOBAL_LOGOUT; + break; + case IN_PORT_CHANGED: + notify.nt_ncode = NT_CHANGED; + break; + default: + isp_prt(isp, ISP_LOGINFO, "%s: unhandled status (0x%x)", + __func__, status); + isp_async(isp, ISPASYNC_TARGET_NOTIFY_ACK, inp); + return; + } + isp_async(isp, ISPASYNC_TARGET_NOTIFY, ¬ify); +} + +static void +isp_handle_notify_24xx(ispsoftc_t *isp, in_fcentry_24xx_t *inot_24xx) { uint8_t ochan, chan, lochan, hichan; From owner-svn-src-stable-10@freebsd.org Wed Mar 29 16:13:26 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3BB13D23BC7; Wed, 29 Mar 2017 16:13:26 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0AB341333; Wed, 29 Mar 2017 16:13:25 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2TGDPpm059346; Wed, 29 Mar 2017 16:13:25 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2TGDOAa059342; Wed, 29 Mar 2017 16:13:24 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201703291613.v2TGDOAa059342@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 29 Mar 2017 16:13:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r316163 - stable/10/sys/dev/isp X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Mar 2017 16:13:26 -0000 Author: mav Date: Wed Mar 29 16:13:24 2017 New Revision: 316163 URL: https://svnweb.freebsd.org/changeset/base/316163 Log: MFC r315533: Move 24xx RQSTYPE_NOTIFY handling to generic code. This code has nothing to do with specific platform. Modified: stable/10/sys/dev/isp/isp_freebsd.c stable/10/sys/dev/isp/isp_target.c stable/10/sys/dev/isp/isp_target.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/isp/isp_freebsd.c ============================================================================== --- stable/10/sys/dev/isp/isp_freebsd.c Wed Mar 29 16:12:41 2017 (r316162) +++ stable/10/sys/dev/isp/isp_freebsd.c Wed Mar 29 16:13:24 2017 (r316163) @@ -788,7 +788,6 @@ static void isp_target_start_ctio(ispsof static void isp_handle_platform_atio2(ispsoftc_t *, at2_entry_t *); static void isp_handle_platform_atio7(ispsoftc_t *, at7_entry_t *); static void isp_handle_platform_ctio(ispsoftc_t *, void *); -static void isp_handle_platform_notify_24xx(ispsoftc_t *, in_fcentry_24xx_t *); static int isp_handle_platform_target_notify_ack(ispsoftc_t *, isp_notify_t *, uint32_t rsp); static void isp_handle_platform_target_tmf(ispsoftc_t *, isp_notify_t *); static void isp_target_mark_aborted_early(ispsoftc_t *, int chan, tstate_t *, uint32_t); @@ -2108,28 +2107,24 @@ mdp: static void -isp_handle_srr_notify(ispsoftc_t *isp, void *inot_raw) +isp_handle_platform_srr(ispsoftc_t *isp, isp_notify_t *notify) { - in_fcentry_24xx_t *inot = inot_raw; + in_fcentry_24xx_t *inot = notify->nt_lreserved; atio_private_data_t *atp; - uint32_t tag = inot->in_rxid; - uint32_t bus = inot->in_vpidx; + uint32_t tag = notify->nt_tagval & 0xffffffff; - if (!IS_24XX(isp)) { - isp_async(isp, ISPASYNC_TARGET_NOTIFY_ACK, inot_raw); - return; - } - - atp = isp_find_atpd(isp, bus, tag); + atp = isp_find_atpd(isp, notify->nt_channel, tag); if (atp == NULL) { - isp_prt(isp, ISP_LOGERR, "%s: cannot find adjunct for %x in SRR Notify", __func__, tag); + isp_prt(isp, ISP_LOGERR, "%s: cannot find adjunct for %x in SRR Notify", + __func__, tag); isp_async(isp, ISPASYNC_TARGET_NOTIFY_ACK, inot); return; } atp->srr_notify_rcvd = 1; memcpy(atp->srr, inot, sizeof (atp->srr)); - isp_prt(isp, ISP_LOGTINFO /* ISP_LOGTDEBUG0 */, "SRR[0x%x] inot->in_rxid flags 0x%x srr_iu=%x reloff 0x%x", inot->in_rxid, inot->in_flags, inot->in_srr_iu, - inot->in_srr_reloff_lo | (inot->in_srr_reloff_hi << 16)); + isp_prt(isp, ISP_LOGTINFO, "SRR[0x%x] flags 0x%x srr_iu %x reloff 0x%x", + inot->in_rxid, inot->in_flags, inot->in_srr_iu, + ((uint32_t)inot->in_srr_reloff_hi << 16) | inot->in_srr_reloff_lo); if (atp->srr_ccb) isp_handle_srr_start(isp, atp); } @@ -2281,127 +2276,6 @@ isp_handle_platform_ctio(ispsoftc_t *isp } } -static void -isp_handle_platform_notify_24xx(ispsoftc_t *isp, in_fcentry_24xx_t *inot) -{ - uint16_t nphdl; - uint16_t prli_options = 0; - uint32_t portid; - fcportdb_t *lp; - char *msg = NULL; - uint8_t *ptr = (uint8_t *)inot; - uint64_t wwpn = INI_NONE, wwnn = INI_NONE; - - nphdl = inot->in_nphdl; - if (nphdl != NIL_HANDLE) { - portid = inot->in_portid_hi << 16 | inot->in_portid_lo; - } else { - portid = PORT_ANY; - } - - switch (inot->in_status) { - case IN24XX_ELS_RCVD: - { - char buf[16]; - int chan = ISP_GET_VPIDX(isp, inot->in_vpidx); - - /* - * Note that we're just getting notification that an ELS was received - * (possibly with some associated information sent upstream). This is - * *not* the same as being given the ELS frame to accept or reject. - */ - switch (inot->in_status_subcode) { - case LOGO: - msg = "LOGO"; - wwpn = be64dec(&ptr[IN24XX_PLOGI_WWPN_OFF]); - isp_del_wwn_entry(isp, chan, wwpn, nphdl, portid); - break; - case PRLO: - msg = "PRLO"; - break; - case PLOGI: - msg = "PLOGI"; - wwnn = be64dec(&ptr[IN24XX_PLOGI_WWNN_OFF]); - wwpn = be64dec(&ptr[IN24XX_PLOGI_WWPN_OFF]); - isp_add_wwn_entry(isp, chan, wwpn, wwnn, - nphdl, portid, prli_options); - break; - case PRLI: - msg = "PRLI"; - prli_options = inot->in_prli_options; - if (inot->in_flags & IN24XX_FLAG_PN_NN_VALID) - wwnn = be64dec(&ptr[IN24XX_PRLI_WWNN_OFF]); - wwpn = be64dec(&ptr[IN24XX_PRLI_WWPN_OFF]); - isp_add_wwn_entry(isp, chan, wwpn, wwnn, - nphdl, portid, prli_options); - break; - case PDISC: - msg = "PDISC"; - break; - case ADISC: - msg = "ADISC"; - break; - default: - ISP_SNPRINTF(buf, sizeof (buf), "ELS 0x%x", inot->in_status_subcode); - msg = buf; - break; - } - if (inot->in_flags & IN24XX_FLAG_PUREX_IOCB) { - isp_prt(isp, ISP_LOGERR, "%s Chan %d ELS N-port handle %x PortID 0x%06x marked as needing a PUREX response", msg, chan, nphdl, portid); - break; - } - isp_prt(isp, ISP_LOGTDEBUG0, "%s Chan %d ELS N-port handle %x PortID 0x%06x RX_ID 0x%x OX_ID 0x%x", msg, chan, nphdl, portid, - inot->in_rxid, inot->in_oxid); - isp_async(isp, ISPASYNC_TARGET_NOTIFY_ACK, inot); - break; - } - - case IN24XX_PORT_LOGOUT: - msg = "PORT LOGOUT"; - if (isp_find_pdb_by_handle(isp, ISP_GET_VPIDX(isp, inot->in_vpidx), nphdl, &lp)) { - isp_del_wwn_entry(isp, ISP_GET_VPIDX(isp, inot->in_vpidx), lp->port_wwn, nphdl, lp->portid); - } - /* FALLTHROUGH */ - case IN24XX_PORT_CHANGED: - if (msg == NULL) - msg = "PORT CHANGED"; - /* FALLTHROUGH */ - case IN24XX_LIP_RESET: - if (msg == NULL) - msg = "LIP RESET"; - isp_prt(isp, ISP_LOGINFO, "Chan %d %s (sub-status 0x%x) for N-port handle 0x%x", ISP_GET_VPIDX(isp, inot->in_vpidx), msg, inot->in_status_subcode, nphdl); - - /* - * All subcodes here are irrelevant. What is relevant - * is that we need to terminate all active commands from - * this initiator (known by N-port handle). - */ - /* XXX IMPLEMENT XXX */ - isp_async(isp, ISPASYNC_TARGET_NOTIFY_ACK, inot); - break; - - case IN24XX_SRR_RCVD: -#ifdef ISP_TARGET_MODE - isp_handle_srr_notify(isp, inot); - break; -#else - if (msg == NULL) - msg = "SRR RCVD"; - /* FALLTHROUGH */ -#endif - case IN24XX_LINK_RESET: - if (msg == NULL) - msg = "LINK RESET"; - case IN24XX_LINK_FAILED: - if (msg == NULL) - msg = "LINK FAILED"; - default: - isp_prt(isp, ISP_LOGWARN, "Chan %d %s", ISP_GET_VPIDX(isp, inot->in_vpidx), msg); - isp_async(isp, ISPASYNC_TARGET_NOTIFY_ACK, inot); - break; - } -} - static int isp_handle_platform_target_notify_ack(ispsoftc_t *isp, isp_notify_t *mp, uint32_t rsp) { @@ -4043,6 +3917,9 @@ changed: */ isp_handle_platform_target_notify_ack(isp, notify, 0); break; + case NT_SRR: + isp_handle_platform_srr(isp, notify); + break; default: isp_prt(isp, ISP_LOGALL, "target notify code 0x%x", notify->nt_ncode); isp_handle_platform_target_notify_ack(isp, notify, 0); @@ -4079,12 +3956,6 @@ changed: hp = va_arg(ap, isphdr_t *); va_end(ap); switch (hp->rqs_entry_type) { - default: - isp_prt(isp, ISP_LOGWARN, "%s: unhandled target action 0x%x", __func__, hp->rqs_entry_type); - break; - case RQSTYPE_NOTIFY: - isp_handle_platform_notify_24xx(isp, (in_fcentry_24xx_t *) hp); - break; case RQSTYPE_ATIO: isp_handle_platform_atio7(isp, (at7_entry_t *) hp); break; @@ -4097,6 +3968,10 @@ changed: case RQSTYPE_CTIO: isp_handle_platform_ctio(isp, hp); break; + default: + isp_prt(isp, ISP_LOGWARN, "%s: unhandled target action 0x%x", + __func__, hp->rqs_entry_type); + break; } break; } Modified: stable/10/sys/dev/isp/isp_target.c ============================================================================== --- stable/10/sys/dev/isp/isp_target.c Wed Mar 29 16:12:41 2017 (r316162) +++ stable/10/sys/dev/isp/isp_target.c Wed Mar 29 16:13:24 2017 (r316163) @@ -152,7 +152,7 @@ isp_target_notify(ispsoftc_t *isp, void #define hdrp unp.hp } unp; uint8_t local[QENTRY_LEN]; - int bus, type, len, level, rval = 1; + int type, len, level, rval = 1; type = isp_get_response_type(isp, (isphdr_t *)vptr); unp.vp = vptr; @@ -214,11 +214,9 @@ isp_target_notify(ispsoftc_t *isp, void break; case RQSTYPE_NOTIFY: - bus = 0; if (IS_24XX(isp)) { isp_get_notify_24xx(isp, inot_24xx, (in_fcentry_24xx_t *)local); - inot_24xx = (in_fcentry_24xx_t *) local; - isp_handle_notify_24xx(isp, inot_24xx); + isp_handle_notify_24xx(isp, (in_fcentry_24xx_t *)local); break; } if (ISP_CAP_2KLOGIN(isp)) @@ -1380,51 +1378,152 @@ isp_handle_notify(ispsoftc_t *isp, in_fc } static void -isp_handle_notify_24xx(ispsoftc_t *isp, in_fcentry_24xx_t *inot_24xx) +isp_handle_notify_24xx(ispsoftc_t *isp, in_fcentry_24xx_t *inot) { - uint8_t ochan, chan, lochan, hichan; + uint8_t chan; + uint16_t nphdl, prli_options = 0; + uint32_t portid; + fcportdb_t *lp; + char *msg = NULL; + uint8_t *ptr = (uint8_t *)inot; + uint64_t wwpn = INI_NONE, wwnn = INI_NONE; + isp_notify_t notify; + char buf[16]; - /* - * Check to see whether we got a wildcard channel. - * If so, we have to iterate over all channels. - */ - ochan = chan = ISP_GET_VPIDX(isp, inot_24xx->in_vpidx); - if (chan == 0xff) { - lochan = 0; - hichan = isp->isp_nchan; + nphdl = inot->in_nphdl; + if (nphdl != NIL_HANDLE) { + portid = inot->in_portid_hi << 16 | inot->in_portid_lo; } else { - if (chan >= isp->isp_nchan) { - char buf[64]; - ISP_SNPRINTF(buf, sizeof buf, "%s: bad channel %d for status 0x%x", __func__, chan, inot_24xx->in_status); - isp_print_bytes(isp, buf, QENTRY_LEN, inot_24xx); - isp_async(isp, ISPASYNC_TARGET_NOTIFY_ACK, inot_24xx); - return; + portid = PORT_ANY; + } + + chan = ISP_GET_VPIDX(isp, inot->in_vpidx); + if (chan >= isp->isp_nchan && + inot->in_status != IN24XX_LIP_RESET && + inot->in_status != IN24XX_LINK_RESET && + inot->in_status != IN24XX_LINK_FAILED) { + isp_prt(isp, ISP_LOGWARN, "%s: Received INOT with status %x on VP %x", + __func__, inot->in_status, chan); + isp_async(isp, ISPASYNC_TARGET_NOTIFY_ACK, inot); + return; + } + + switch (inot->in_status) { + case IN24XX_ELS_RCVD: + { + /* + * Note that we're just getting notification that an ELS was + * received (possibly with some associated information sent + * upstream). This is *not* the same as being given the ELS + * frame to accept or reject. + */ + switch (inot->in_status_subcode) { + case LOGO: + msg = "LOGO"; + wwpn = be64dec(&ptr[IN24XX_PLOGI_WWPN_OFF]); + isp_del_wwn_entry(isp, chan, wwpn, nphdl, portid); + break; + case PRLO: + msg = "PRLO"; + break; + case PLOGI: + msg = "PLOGI"; + wwnn = be64dec(&ptr[IN24XX_PLOGI_WWNN_OFF]); + wwpn = be64dec(&ptr[IN24XX_PLOGI_WWPN_OFF]); + isp_add_wwn_entry(isp, chan, wwpn, wwnn, + nphdl, portid, prli_options); + break; + case PRLI: + msg = "PRLI"; + prli_options = inot->in_prli_options; + if (inot->in_flags & IN24XX_FLAG_PN_NN_VALID) + wwnn = be64dec(&ptr[IN24XX_PRLI_WWNN_OFF]); + wwpn = be64dec(&ptr[IN24XX_PRLI_WWPN_OFF]); + isp_add_wwn_entry(isp, chan, wwpn, wwnn, + nphdl, portid, prli_options); + break; + case PDISC: + msg = "PDISC"; + break; + case ADISC: + msg = "ADISC"; + break; + default: + ISP_SNPRINTF(buf, sizeof (buf), "ELS 0x%x", + inot->in_status_subcode); + msg = buf; + break; + } + if (inot->in_flags & IN24XX_FLAG_PUREX_IOCB) { + isp_prt(isp, ISP_LOGERR, "%s Chan %d ELS N-port handle %x" + " PortID 0x%06x marked as needing a PUREX response", + msg, chan, nphdl, portid); + break; } - lochan = chan; - hichan = chan + 1; + isp_prt(isp, ISP_LOGTDEBUG0, "%s Chan %d ELS N-port handle %x" + " PortID 0x%06x RX_ID 0x%x OX_ID 0x%x", msg, chan, nphdl, + portid, inot->in_rxid, inot->in_oxid); + isp_async(isp, ISPASYNC_TARGET_NOTIFY_ACK, inot); + break; } - isp_prt(isp, ISP_LOGTDEBUG1, "%s: Immediate Notify Channels %d..%d status=0x%x seqid=0x%x", __func__, lochan, hichan-1, inot_24xx->in_status, inot_24xx->in_rxid); - switch (inot_24xx->in_status) { - case IN24XX_LIP_RESET: - case IN24XX_LINK_RESET: + case IN24XX_PORT_LOGOUT: + msg = "PORT LOGOUT"; + if (isp_find_pdb_by_handle(isp, chan, nphdl, &lp)) + isp_del_wwn_entry(isp, chan, lp->port_wwn, nphdl, lp->portid); + /* FALLTHROUGH */ case IN24XX_PORT_CHANGED: - case IN24XX_LINK_FAILED: + if (msg == NULL) + msg = "PORT CHANGED"; + /* FALLTHROUGH */ + case IN24XX_LIP_RESET: + if (msg == NULL) + msg = "LIP RESET"; + isp_prt(isp, ISP_LOGINFO, "Chan %d %s (sub-status 0x%x) for " + "N-port handle 0x%x", + chan, msg, inot->in_status_subcode, nphdl); + + /* + * All subcodes here are irrelevant. What is relevant + * is that we need to terminate all active commands from + * this initiator (known by N-port handle). + */ + /* XXX IMPLEMENT XXX */ + isp_async(isp, ISPASYNC_TARGET_NOTIFY_ACK, inot); + break; + case IN24XX_SRR_RCVD: - case IN24XX_ELS_RCVD: - for (chan = lochan; chan < hichan; chan++) { - if (FCPARAM(isp, chan)->role == ISP_ROLE_NONE) - continue; - inot_24xx->in_reserved = 0; /* clear this for later usage */ - inot_24xx->in_vpidx = chan; - isp_async(isp, ISPASYNC_TARGET_ACTION, inot_24xx); - } - inot_24xx->in_vpidx = ochan; +#ifdef ISP_TARGET_MODE + ISP_MEMZERO(¬ify, sizeof (isp_notify_t)); + notify.nt_hba = isp; + notify.nt_wwn = INI_ANY; + notify.nt_tgt = FCPARAM(isp, chan)->isp_wwpn; + notify.nt_nphdl = nphdl; + notify.nt_sid = portid; + notify.nt_did = PORT_ANY; + notify.nt_lun = LUN_ANY; + notify.nt_tagval = inot->in_rxid; + notify.nt_tagval |= ((uint64_t)inot->in_srr_rxid << 32); + notify.nt_need_ack = 1; + notify.nt_channel = chan; + notify.nt_lreserved = inot; + notify.nt_ncode = NT_SRR; + isp_async(isp, ISPASYNC_TARGET_NOTIFY, ¬ify); break; +#else + if (msg == NULL) + msg = "SRR RCVD"; + /* FALLTHROUGH */ +#endif + case IN24XX_LINK_RESET: + if (msg == NULL) + msg = "LINK RESET"; + case IN24XX_LINK_FAILED: + if (msg == NULL) + msg = "LINK FAILED"; default: - isp_prt(isp, ISP_LOGINFO, "%s: unhandled status (0x%x) for chan %d", - __func__, inot_24xx->in_status, chan); - isp_async(isp, ISPASYNC_TARGET_NOTIFY_ACK, inot_24xx); + isp_prt(isp, ISP_LOGWARN, "Chan %d %s", chan, msg); + isp_async(isp, ISPASYNC_TARGET_NOTIFY_ACK, inot); break; } } Modified: stable/10/sys/dev/isp/isp_target.h ============================================================================== --- stable/10/sys/dev/isp/isp_target.h Wed Mar 29 16:12:41 2017 (r316162) +++ stable/10/sys/dev/isp/isp_target.h Wed Mar 29 16:13:24 2017 (r316163) @@ -53,7 +53,8 @@ typedef enum { NT_CHANGED, NT_HBA_RESET, NT_QUERY_TASK_SET, - NT_QUERY_ASYNC_EVENT + NT_QUERY_ASYNC_EVENT, + NT_SRR /* Sequence Retransmission Request */ } isp_ncode_t; typedef struct isp_notify { From owner-svn-src-stable-10@freebsd.org Wed Mar 29 16:14:35 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 10935D23D19; Wed, 29 Mar 2017 16:14:35 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D41051507; Wed, 29 Mar 2017 16:14:34 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2TGEXeA059486; Wed, 29 Mar 2017 16:14:33 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2TGEXAt059485; Wed, 29 Mar 2017 16:14:33 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201703291614.v2TGEXAt059485@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 29 Mar 2017 16:14:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r316165 - stable/10/sys/dev/isp X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Mar 2017 16:14:35 -0000 Author: mav Date: Wed Mar 29 16:14:33 2017 New Revision: 316165 URL: https://svnweb.freebsd.org/changeset/base/316165 Log: MFC r315534: Remove some dead stuff. Modified: stable/10/sys/dev/isp/isp_target.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/isp/isp_target.h ============================================================================== --- stable/10/sys/dev/isp/isp_target.h Wed Mar 29 16:14:04 2017 (r316164) +++ stable/10/sys/dev/isp/isp_target.h Wed Mar 29 16:14:33 2017 (r316165) @@ -59,30 +59,19 @@ typedef enum { typedef struct isp_notify { void * nt_hba; /* HBA tag */ - void * nt_tmd; - void * nt_lreserved; - void * nt_hreserved; + void * nt_lreserved; /* original IOCB pointer */ uint64_t nt_wwn; /* source (wwn) */ uint64_t nt_tgt; /* destination (wwn) */ uint64_t nt_tagval; /* tag value */ lun_id_t nt_lun; /* logical unit */ - uint32_t - nt_sid : 24; /* source port id */ - uint32_t - nt_failed : 1, /* notify operation failed */ - nt_need_ack : 1, /* this notify needs an ACK */ - nt_did : 24; /* destination port id */ + uint32_t nt_sid : 24; /* source port id */ + uint32_t nt_did : 24; /* destination port id */ uint16_t nt_nphdl; /* n-port handle */ uint8_t nt_channel; /* channel id */ + uint8_t nt_need_ack; /* this notify needs an ACK */ isp_ncode_t nt_ncode; /* action */ } isp_notify_t; -#define MATCH_TMD(tmd, iid, lun, tag) \ - ( \ - (tmd) && \ - (iid == INI_ANY || iid == tmd->cd_iid) && \ - (lun == LUN_ANY || lun == tmd->cd_lun) && \ - (tag == TAG_ANY || tag == tmd->cd_tagval) \ - ) + /* * Debug macros */ From owner-svn-src-stable-10@freebsd.org Wed Mar 29 16:15:54 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 39C98D23DFB; Wed, 29 Mar 2017 16:15:54 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EEF2F163D; Wed, 29 Mar 2017 16:15:53 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2TGFrbV059648; Wed, 29 Mar 2017 16:15:53 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2TGFqSR059646; Wed, 29 Mar 2017 16:15:52 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201703291615.v2TGFqSR059646@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 29 Mar 2017 16:15:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r316167 - stable/10/sys/dev/isp X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Mar 2017 16:15:54 -0000 Author: mav Date: Wed Mar 29 16:15:52 2017 New Revision: 316167 URL: https://svnweb.freebsd.org/changeset/base/316167 Log: MFC r315536: Move <= 23xx PDB workaround to generic code. It is chip-specific and has nothing to do with platform. Modified: stable/10/sys/dev/isp/isp_freebsd.c stable/10/sys/dev/isp/isp_target.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/isp/isp_freebsd.c ============================================================================== --- stable/10/sys/dev/isp/isp_freebsd.c Wed Mar 29 16:15:18 2017 (r316166) +++ stable/10/sys/dev/isp/isp_freebsd.c Wed Mar 29 16:15:52 2017 (r316167) @@ -1743,22 +1743,15 @@ isp_handle_platform_atio2(ispsoftc_t *is if (IS_2100(isp)) atiop->init_id = nphdl; else { - if ((isp_find_pdb_by_handle(isp, 0, nphdl, &lp) == 0 || - lp->state == FC_PORTDB_STATE_ZOMBIE)) { - uint64_t wwpn = - (((uint64_t) aep->at_wwpn[0]) << 48) | - (((uint64_t) aep->at_wwpn[1]) << 32) | - (((uint64_t) aep->at_wwpn[2]) << 16) | - (((uint64_t) aep->at_wwpn[3]) << 0); - isp_add_wwn_entry(isp, 0, wwpn, INI_NONE, - nphdl, PORT_ANY, 0); - if (fcp->isp_loopstate > LOOP_LTEST_DONE) - fcp->isp_loopstate = LOOP_LTEST_DONE; - isp_async(isp, ISPASYNC_CHANGE_NOTIFY, 0, - ISPASYNC_CHANGE_PDB, nphdl, 0x06, 0xff); - isp_find_pdb_by_handle(isp, 0, nphdl, &lp); + if (isp_find_pdb_by_handle(isp, 0, nphdl, &lp)) { + atiop->init_id = FC_PORTDB_TGT(isp, 0, lp); + } else { + isp_prt(isp, ISP_LOGTINFO, "%s: port %x isn't in PDB", + __func__, nphdl); + isp_dump_portdb(isp, 0); + isp_endcmd(isp, aep, NIL_HANDLE, 0, ECMD_TERMINATE, 0); + return; } - atiop->init_id = FC_PORTDB_TGT(isp, 0, lp); } atiop->cdb_len = ATIO2_CDBLEN; ISP_MEMCPY(atiop->cdb_io.cdb_bytes, aep->at_cdb, ATIO2_CDBLEN); Modified: stable/10/sys/dev/isp/isp_target.c ============================================================================== --- stable/10/sys/dev/isp/isp_target.c Wed Mar 29 16:15:18 2017 (r316166) +++ stable/10/sys/dev/isp/isp_target.c Wed Mar 29 16:15:52 2017 (r316167) @@ -919,6 +919,7 @@ isp_handle_abts(ispsoftc_t *isp, abts_t static void isp_handle_atio2(ispsoftc_t *isp, at2_entry_t *aep) { + fcportdb_t *lp; int lun, iid; if (ISP_CAP_SCCFW(isp)) { @@ -975,9 +976,26 @@ isp_handle_atio2(ispsoftc_t *isp, at2_en break; case AT_CDB: /* Got a CDB */ - /* - * Punt to platform specific layer. - */ + + /* Make sure we have this inititor in port database. */ + if (!IS_2100(isp) && + (isp_find_pdb_by_handle(isp, 0, iid, &lp) == 0 || + lp->state == FC_PORTDB_STATE_ZOMBIE)) { + fcparam *fcp = FCPARAM(isp, 0); + uint64_t wwpn = + (((uint64_t) aep->at_wwpn[0]) << 48) | + (((uint64_t) aep->at_wwpn[1]) << 32) | + (((uint64_t) aep->at_wwpn[2]) << 16) | + (((uint64_t) aep->at_wwpn[3]) << 0); + isp_add_wwn_entry(isp, 0, wwpn, INI_NONE, + iid, PORT_ANY, 0); + if (fcp->isp_loopstate > LOOP_LTEST_DONE) + fcp->isp_loopstate = LOOP_LTEST_DONE; + isp_async(isp, ISPASYNC_CHANGE_NOTIFY, 0, + ISPASYNC_CHANGE_PDB, iid, 0x06, 0xff); + } + + /* Punt to platform specific layer. */ isp_async(isp, ISPASYNC_TARGET_ACTION, aep); break; From owner-svn-src-stable-10@freebsd.org Wed Mar 29 16:17:11 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D260FD23F60; Wed, 29 Mar 2017 16:17:11 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AD083185E; Wed, 29 Mar 2017 16:17:11 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2TGHAKT059801; Wed, 29 Mar 2017 16:17:10 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2TGHAgI059797; Wed, 29 Mar 2017 16:17:10 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201703291617.v2TGHAgI059797@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 29 Mar 2017 16:17:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r316169 - stable/10/sys/dev/isp X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Mar 2017 16:17:11 -0000 Author: mav Date: Wed Mar 29 16:17:10 2017 New Revision: 316169 URL: https://svnweb.freebsd.org/changeset/base/316169 Log: MFC r315545: Remove hackish code delaying ATIOs to unknown virtual port. Since we support RQSTYPE_RPT_ID_ACQ, that functionality is only useful in loop mode, which probably doesn't worth having this hack in 2017. Modified: stable/10/sys/dev/isp/isp.c stable/10/sys/dev/isp/isp_freebsd.c stable/10/sys/dev/isp/isp_target.c stable/10/sys/dev/isp/ispvar.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/isp/isp.c ============================================================================== --- stable/10/sys/dev/isp/isp.c Wed Mar 29 16:16:39 2017 (r316168) +++ stable/10/sys/dev/isp/isp.c Wed Mar 29 16:17:10 2017 (r316169) @@ -1323,7 +1323,6 @@ isp_init(ispsoftc_t *isp) } else { isp_scsi_init(isp); } - GET_NANOTIME(&isp->isp_init_time); } static void @@ -2368,7 +2367,6 @@ isp_fc_enable_vp(ispsoftc_t *isp, int ch __func__, chan, vp.vp_mod_hdr.rqs_flags, vp.vp_mod_status); return (EIO); } - GET_NANOTIME(&isp->isp_init_time); return (0); } @@ -5655,7 +5653,6 @@ isp_parse_async_fc(ispsoftc_t *isp, uint * These are broadcast events that have to be sent across * all active channels. */ - GET_NANOTIME(&isp->isp_init_time); for (chan = 0; chan < isp->isp_nchan; chan++) { fcp = FCPARAM(isp, chan); int topo = fcp->isp_topo; @@ -5710,7 +5707,6 @@ isp_parse_async_fc(ispsoftc_t *isp, uint * This is a broadcast event that has to be sent across * all active channels. */ - GET_NANOTIME(&isp->isp_init_time); for (chan = 0; chan < isp->isp_nchan; chan++) { fcp = FCPARAM(isp, chan); if (fcp->role == ISP_ROLE_NONE) @@ -5750,7 +5746,6 @@ isp_parse_async_fc(ispsoftc_t *isp, uint * This is a broadcast event that has to be sent across * all active channels. */ - GET_NANOTIME(&isp->isp_init_time); for (chan = 0; chan < isp->isp_nchan; chan++) { fcp = FCPARAM(isp, chan); if (fcp->role == ISP_ROLE_NONE) @@ -5942,7 +5937,6 @@ isp_handle_other_response(ispsoftc_t *is portid = (uint32_t)rid.ridacq_vp_port_hi << 16 | rid.ridacq_vp_port_lo; if (rid.ridacq_format == 0) { - GET_NANOTIME(&isp->isp_init_time); for (chan = 0; chan < isp->isp_nchan; chan++) { fcparam *fcp = FCPARAM(isp, chan); if (fcp->role == ISP_ROLE_NONE) Modified: stable/10/sys/dev/isp/isp_freebsd.c ============================================================================== --- stable/10/sys/dev/isp/isp_freebsd.c Wed Mar 29 16:16:39 2017 (r316168) +++ stable/10/sys/dev/isp/isp_freebsd.c Wed Mar 29 16:17:10 2017 (r316169) @@ -1817,44 +1817,17 @@ isp_handle_platform_atio7(ispsoftc_t *is sid = (aep->at_hdr.s_id[0] << 16) | (aep->at_hdr.s_id[1] << 8) | aep->at_hdr.s_id[2]; lun = CAM_EXTLUN_BYTE_SWIZZLE(be64dec(aep->at_cmnd.fcp_cmnd_lun)); - /* - * Find the N-port handle, and Virtual Port Index for this command. - * - * If we can't, we're somewhat in trouble because we can't actually respond w/o that information. - * We also, as a matter of course, need to know the WWN of the initiator too. - */ if (ISP_CAP_MULTI_ID(isp) && isp->isp_nchan > 1) { - /* - * Find the right channel based upon D_ID - */ + /* Channel has to be derived from D_ID */ isp_find_chan_by_did(isp, did, &chan); - if (chan == ISP_NOCHAN) { - NANOTIME_T now; - - /* - * If we don't recognizer our own D_DID, terminate the exchange, unless we're within 2 seconds of startup - * It's a bit tricky here as we need to stash this command *somewhere*. - */ - GET_NANOTIME(&now); - if (NANOTIME_SUB(&now, &isp->isp_init_time) > 2000000000ULL) { - isp_prt(isp, ISP_LOGWARN, "%s: [RX_ID 0x%x] D_ID %x not found on any channel- dropping", __func__, aep->at_rxid, did); - isp_endcmd(isp, aep, NIL_HANDLE, ISP_NOCHAN, ECMD_TERMINATE, 0); - return; - } - tptr = get_lun_statep(isp, 0, 0); - if (tptr == NULL) { - tptr = get_lun_statep(isp, 0, CAM_LUN_WILDCARD); - if (tptr == NULL) { - isp_prt(isp, ISP_LOGWARN, "%s: [RX_ID 0x%x] D_ID %x not found on any channel and no tptr- dropping", __func__, aep->at_rxid, did); - isp_endcmd(isp, aep, NIL_HANDLE, ISP_NOCHAN, ECMD_TERMINATE, 0); - return; - } - } - isp_prt(isp, ISP_LOGWARN, "%s: [RX_ID 0x%x] D_ID %x not found on any channel- deferring", __func__, aep->at_rxid, did); - goto noresrc; + isp_prt(isp, ISP_LOGWARN, + "%s: [RX_ID 0x%x] D_ID %x not found on any channel", + __func__, aep->at_rxid, did); + isp_endcmd(isp, aep, NIL_HANDLE, ISP_NOCHAN, + ECMD_TERMINATE, 0); + return; } - isp_prt(isp, ISP_LOGTDEBUG0, "%s: [RX_ID 0x%x] D_ID 0x%06x found on Chan %d for S_ID 0x%06x", __func__, aep->at_rxid, did, chan, sid); } else { chan = 0; } Modified: stable/10/sys/dev/isp/isp_target.c ============================================================================== --- stable/10/sys/dev/isp/isp_target.c Wed Mar 29 16:16:39 2017 (r316168) +++ stable/10/sys/dev/isp/isp_target.c Wed Mar 29 16:17:10 2017 (r316169) @@ -688,8 +688,11 @@ isp_got_tmf_24xx(ispsoftc_t *isp, at7_en /* Channel has to be derived from D_ID */ isp_find_chan_by_did(isp, did, &chan); if (chan == ISP_NOCHAN) { - isp_prt(isp, ISP_LOGWARN, "%s: D_ID 0x%x not found on any channel", __func__, did); - isp_endcmd(isp, aep, NIL_HANDLE, ISP_NOCHAN, ECMD_TERMINATE, 0); + isp_prt(isp, ISP_LOGWARN, + "%s: D_ID 0x%x not found on any channel", + __func__, did); + isp_endcmd(isp, aep, NIL_HANDLE, ISP_NOCHAN, + ECMD_TERMINATE, 0); return; } } else { @@ -891,17 +894,23 @@ isp_handle_abts(ispsoftc_t *isp, abts_t nt->nt_did = did; nt->nt_nphdl = abts->abts_nphdl; nt->nt_sid = sid; - isp_find_chan_by_did(isp, did, &chan); - if (chan == ISP_NOCHAN) { - nt->nt_tgt = TGT_ANY; - } else { - nt->nt_tgt = FCPARAM(isp, chan)->isp_wwpn; - if (isp_find_pdb_by_handle(isp, chan, abts->abts_nphdl, &lp)) { - nt->nt_wwn = lp->port_wwn; - } else { - nt->nt_wwn = INI_ANY; + if (ISP_CAP_MULTI_ID(isp) && isp->isp_nchan > 1) { + /* Channel has to be derived from D_ID */ + isp_find_chan_by_did(isp, did, &chan); + if (chan == ISP_NOCHAN) { + isp_prt(isp, ISP_LOGWARN, + "%s: D_ID 0x%x not found on any channel", + __func__, did); + isp_acknak_abts(isp, abts, ENXIO); + return; } - } + } else + chan = 0; + nt->nt_tgt = FCPARAM(isp, chan)->isp_wwpn; + if (isp_find_pdb_by_handle(isp, chan, abts->abts_nphdl, &lp)) + nt->nt_wwn = lp->port_wwn; + else + nt->nt_wwn = INI_ANY; nt->nt_lun = LUN_ANY; nt->nt_need_ack = 1; nt->nt_tagval = abts->abts_rxid_task; Modified: stable/10/sys/dev/isp/ispvar.h ============================================================================== --- stable/10/sys/dev/isp/ispvar.h Wed Mar 29 16:16:39 2017 (r316168) +++ stable/10/sys/dev/isp/ispvar.h Wed Mar 29 16:17:10 2017 (r316169) @@ -544,7 +544,6 @@ struct ispsoftc { uint32_t isp_rqstoutrp; /* register for REQOUTP */ uint32_t isp_respinrp; /* register for RESINP */ uint32_t isp_respoutrp; /* register for RESOUTP */ - NANOTIME_T isp_init_time; /* time were last initialized */ /* * Volatile state From owner-svn-src-stable-10@freebsd.org Wed Mar 29 17:11:42 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 74F38D24D4E; Wed, 29 Mar 2017 17:11:42 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 442B865B25; Wed, 29 Mar 2017 17:11:42 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2THBfMY081601; Wed, 29 Mar 2017 17:11:41 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2THBfvH081600; Wed, 29 Mar 2017 17:11:41 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201703291711.v2THBfvH081600@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Wed, 29 Mar 2017 17:11:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r316170 - stable/10/sys/dev/xen/netfront X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Mar 2017 17:11:42 -0000 Author: ngie Date: Wed Mar 29 17:11:41 2017 New Revision: 316170 URL: https://svnweb.freebsd.org/changeset/base/316170 Log: Fix -Wformat issue with r316140, which broke i386/GENERIC Since r316140 was a direct commit to ^/stable/10, this too is a direct commit to ^/stable/10. Reported by: Jenkins (FreeBSD-stable-10-i386-build job) Tested with: amd64, i386 Sponsored by: Dell EMC Isilon Modified: stable/10/sys/dev/xen/netfront/netfront.c Modified: stable/10/sys/dev/xen/netfront/netfront.c ============================================================================== --- stable/10/sys/dev/xen/netfront/netfront.c Wed Mar 29 16:17:10 2017 (r316169) +++ stable/10/sys/dev/xen/netfront/netfront.c Wed Mar 29 17:11:41 2017 (r316170) @@ -837,7 +837,7 @@ netif_release_rx_bufs_copy(struct netfro if (busy != 0) device_printf(np->xbdev, - "Unable to release %u of %u in use grant references out of %ld total.\n", + "Unable to release %u of %u in use grant references out of %zu total.\n", busy, inuse, NET_RX_RING_SIZE); XN_RX_UNLOCK(np); From owner-svn-src-stable-10@freebsd.org Wed Mar 29 17:12:25 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F31D6D24DCF; Wed, 29 Mar 2017 17:12:25 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pf0-x241.google.com (mail-pf0-x241.google.com [IPv6:2607:f8b0:400e:c00::241]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C05E965DD7; Wed, 29 Mar 2017 17:12:25 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pf0-x241.google.com with SMTP id p189so2572801pfp.0; Wed, 29 Mar 2017 10:12:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=5iS1sdZCr0IPE+hV6S3H03AM7/5ysONNKWNvhNmRqZY=; b=c69vbfbLtrvj7DJcAtjV+V2oqG6EaYhuE8ITAgdRM7IVak/s9cpTM+T9UTxF4YBkHl ufXhy3s41hEZJXDqaIRrsQAInQnUXlX1jXtO8VQDEVOhqgixBJDXF7RVzh+RlI8eJMcc QzqrKTNOjmuT4h+9jjwgUXJLO959GQlX1Avaf4QN0/JJ/XhI66MooTghbb/GhWm+kfRw R8MlIgJ7xZpaspkh5IarY7SZ86c7FT2CAQVNhmFkdOHV9cNIiRF5uIjmREszryhipKOW vxNp0ZUDhi7+W22qXv0yHDTddoLAsbAFR7kMmos++G8W6uuBL6JvLHPXA3ARMbcAVXA7 g2KQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=5iS1sdZCr0IPE+hV6S3H03AM7/5ysONNKWNvhNmRqZY=; b=DskwssB19rn5l0hY6VhNkEPOoZ5FgezdqTGvoIoD71nZXvf84q3O8xOnRuBoI3o+gY 10EMYBEERU7G7Y0iD2yYP7NGkythMd8PBeEE0s8V1AGfNd/s94wLgVPoH2GZjlcAoDLC mzmhzd+C8PNxdcrrJOJN83wGpKY0gMg1h2kLQI4K81B5WDRGqX2ujaJ3dq/kwNrucTBX d95TEh2QN4UT7KO86hemMf/zbIqZ5DyZcFOm/DjlFyaEC9h5LR05I0B3RdQflk1qSBuu LB38xWdN3oolA55tu/UYkP2HueXRqXGxPPO+CtCvRi7pJRfJzaWHAHGuO1zLeZZXHlUU yFBA== X-Gm-Message-State: AFeK/H2eAsoDFE7o+oKseaetfzXRmMDWHiulFGwjCZNJm920bJ/qfQrE5VaG4Ldv1m1VXg== X-Received: by 10.99.171.5 with SMTP id p5mr1635386pgf.208.1490807545158; Wed, 29 Mar 2017 10:12:25 -0700 (PDT) Received: from pinklady.local (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id i3sm14649428pfg.117.2017.03.29.10.12.24 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 29 Mar 2017 10:12:24 -0700 (PDT) Subject: Re: svn commit: r316140 - stable/10/sys/dev/xen/netfront Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_B6848852-D5CC-4876-A965-444038C3A4DB"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: <201703291534.v2TFYq2j041847@repo.freebsd.org> Date: Wed, 29 Mar 2017 10:12:23 -0700 Cc: src-committers , svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Message-Id: <4E2E5DD5-58CB-4847-8E7A-CCF6734E8904@gmail.com> References: <201703291534.v2TFYq2j041847@repo.freebsd.org> To: =?utf-8?Q?Roger_Pau_Monn=C3=A9?= X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Mar 2017 17:12:26 -0000 --Apple-Mail=_B6848852-D5CC-4876-A965-444038C3A4DB Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Mar 29, 2017, at 08:34, Roger Pau Monn=C3=A9 = wrote: >=20 > Author: royger > Date: Wed Mar 29 15:34:52 2017 > New Revision: 316140 > URL: https://svnweb.freebsd.org/changeset/base/316140 >=20 > Log: > xen/netfront: release resources on removal >=20 > Current netfront code doesn't release the resources (grants and = mbufs) on > removal. Add a new helper that releases the resources, so FreeBSD = doesn't run > out of grants or memory when performing heavy hotplug/unplug of Xen = PV nic > devices. >=20 > This is a direct commit to stable/10 because the code in newer = branches has > been completely refactored and no longer has this issue. >=20 > Reviewed by: royger > Submitted by: Ouyangzhaowei > Differential review: https://reviews.freebsd.org/D10088 Hi Roger, This broke GENERIC/i386 with a -Wformat warning, but was fixed = in r316170. Thanks! -Ngie --Apple-Mail=_B6848852-D5CC-4876-A965-444038C3A4DB Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJY2+r3AAoJEPWDqSZpMIYVmh0P/1dD97IivCZ8UKXUkIO7PW1z B8B+n9u5lUhDdovU8GopIglgHjWAPVwlX59wGBMFWyuMZOJKjhB1HM3kUrGQJNLl vVmZOLCMsexPnyeYn3qMZVSfvmJg+ZvSL3XqldvWerS+QRa5pSE+YfAz87/q1bwj R7eg1nVjrWbzRyOmlct/6vDL5EGYGJtUyTawF23R87rPcVSvFJUTzeCGRYrQprhQ trdKzhD6hoBtoUePb7M0+xhFFJyd+8pvhenLb6dtPNGztV0Wp/2PZW5AN693Ex/H EAY7bfrAerV0JyblKjMPY+JMKiUC70hpxvDIsBFN4bp9pCHtNOvU4WmEgYHVPeXo 4xJnSW0bV60DbMgBhCCiiAHNb5xbe6UHL87ZoEMrjkez3YGhtAEpbmn6KlnF3Zdl urNNftLwRJ36N0SrT014AE6w3fAJNJS76UrssNWRaLpeIDtZgsQxxfyrHtCswTjq 2ApZZqi2LSHQ6ArN7Llgk3QBnQ4XeHugQrFMO0hpRbEtj7q8SMiqO/I79nGjpEbH Pgc6c49pc0p9K4M2oW7rIPO7OeHIwZAYN+M8Ui1qTMzEnjp602KwnIIbc3/ZiKxT vq3ia0U8CvqmQHuXDOUr32wfNt1gRRcBmCbQWBIly01l1yR5Uj0FjehV6gNKvvmQ Nrk+JpBadbB4/TiPpWrg =PP3A -----END PGP SIGNATURE----- --Apple-Mail=_B6848852-D5CC-4876-A965-444038C3A4DB-- From owner-svn-src-stable-10@freebsd.org Wed Mar 29 19:25:43 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DC2A8D241F1; Wed, 29 Mar 2017 19:25:43 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9119BE8A; Wed, 29 Mar 2017 19:25:43 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2TJPg0h036876; Wed, 29 Mar 2017 19:25:42 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2TJPgJ7036874; Wed, 29 Mar 2017 19:25:42 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201703291925.v2TJPgJ7036874@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 29 Mar 2017 19:25:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r316173 - stable/10/sys/dev/isp X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Mar 2017 19:25:44 -0000 Author: mav Date: Wed Mar 29 19:25:42 2017 New Revision: 316173 URL: https://svnweb.freebsd.org/changeset/base/316173 Log: Fix build broken by different size of lun_id_t. Modified: stable/10/sys/dev/isp/isp_freebsd.c stable/10/sys/dev/isp/isp_target.c Modified: stable/10/sys/dev/isp/isp_freebsd.c ============================================================================== --- stable/10/sys/dev/isp/isp_freebsd.c Wed Mar 29 19:25:31 2017 (r316172) +++ stable/10/sys/dev/isp/isp_freebsd.c Wed Mar 29 19:25:42 2017 (r316173) @@ -2369,7 +2369,7 @@ isp_handle_platform_target_tmf(ispsoftc_ atio_private_data_t *atp; lun_id_t lun; - isp_prt(isp, ISP_LOGTDEBUG0, "%s: code 0x%x sid 0x%x tagval 0x%016llx chan %d lun %jx", __func__, notify->nt_ncode, + isp_prt(isp, ISP_LOGTDEBUG0, "%s: code 0x%x sid 0x%x tagval 0x%016llx chan %d lun %x", __func__, notify->nt_ncode, notify->nt_sid, (unsigned long long) notify->nt_tagval, notify->nt_channel, notify->nt_lun); if (notify->nt_lun == LUN_ANY) { if (notify->nt_tagval == TAG_ANY) { Modified: stable/10/sys/dev/isp/isp_target.c ============================================================================== --- stable/10/sys/dev/isp/isp_target.c Wed Mar 29 19:25:31 2017 (r316172) +++ stable/10/sys/dev/isp/isp_target.c Wed Mar 29 19:25:42 2017 (r316173) @@ -606,8 +606,8 @@ static void isp_got_msg_fc(ispsoftc_t *isp, in_fcentry_t *inp) { isp_notify_t notify; - static const char f1[] = "%s from N-port handle 0x%x lun %jx seq 0x%x"; - static const char f2[] = "unknown %s 0x%x lun %jx N-Port handle 0x%x task flags 0x%x seq 0x%x\n"; + static const char f1[] = "%s from N-port handle 0x%x lun %x seq 0x%x"; + static const char f2[] = "unknown %s 0x%x lun %x N-Port handle 0x%x task flags 0x%x seq 0x%x\n"; uint16_t seqid, nphdl; ISP_MEMZERO(¬ify, sizeof (isp_notify_t)); @@ -669,8 +669,8 @@ static void isp_got_tmf_24xx(ispsoftc_t *isp, at7_entry_t *aep) { isp_notify_t notify; - static const char f1[] = "%s from PortID 0x%06x lun %jx seq 0x%08x"; - static const char f2[] = "unknown Task Flag 0x%x lun %jx PortID 0x%x tag 0x%08x"; + static const char f1[] = "%s from PortID 0x%06x lun %x seq 0x%08x"; + static const char f2[] = "unknown Task Flag 0x%x lun %x PortID 0x%x tag 0x%08x"; fcportdb_t *lp; uint16_t chan; uint32_t sid, did; From owner-svn-src-stable-10@freebsd.org Thu Mar 30 01:00:47 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 44B61D24330; Thu, 30 Mar 2017 01:00:47 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EE4F9F75; Thu, 30 Mar 2017 01:00:46 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2U10kW5073970; Thu, 30 Mar 2017 01:00:46 GMT (envelope-from sevan@FreeBSD.org) Received: (from sevan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2U10k97073969; Thu, 30 Mar 2017 01:00:46 GMT (envelope-from sevan@FreeBSD.org) Message-Id: <201703300100.v2U10k97073969@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sevan set sender to sevan@FreeBSD.org using -f From: Sevan Janiyan Date: Thu, 30 Mar 2017 01:00:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r316187 - stable/10/usr.sbin/ppp X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Mar 2017 01:00:47 -0000 Author: sevan (doc committer) Date: Thu Mar 30 01:00:45 2017 New Revision: 316187 URL: https://svnweb.freebsd.org/changeset/base/316187 Log: MFC 315964 ftp.microsoft.com is dead and the document was not archived, point to the full protocol spec document instead. Fix spelling mistake flagged by igor. Rephrase bad sentence flagged by igor. Approved by: bcr (mentor) Differential Revision: https://reviews.freebsd.org/D10111 Modified: stable/10/usr.sbin/ppp/ppp.8 Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/ppp/ppp.8 ============================================================================== --- stable/10/usr.sbin/ppp/ppp.8 Thu Mar 30 00:58:04 2017 (r316186) +++ stable/10/usr.sbin/ppp/ppp.8 Thu Mar 30 01:00:45 2017 (r316187) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 25, 2009 +.Dd March 25, 2017 .Dt PPP 8 .Os .Sh NAME @@ -265,7 +265,7 @@ will force it to exit. .It Supports client callback. .Nm can use either the standard LCP callback protocol or the Microsoft -CallBack Control Protocol (ftp://ftp.microsoft.com/developr/rfc/cbcp.txt). +CallBack Control Protocol (https://winprotocoldoc.blob.core.windows.net/productionwindowsarchives/MS-CBCP/[MS-CBCP].pdf). .It Supports NAT or packet aliasing. Packet aliasing (a.k.a.\& IP masquerading) allows computers on a private, unregistered network to access the Internet. @@ -3528,7 +3528,7 @@ for details of the available commands. This command tells .Nm to punch holes in the firewall for FTP or IRC DCC connections. -This is done dynamically by installing termporary firewall rules which +This is done dynamically by installing temporary firewall rules which allow a particular connection (and only that connection) to go through the firewall. The rules are removed once the corresponding connection terminates. @@ -5565,7 +5565,7 @@ seconds. .It set rad_port_id Ar option When RADIUS is configured, setting the .Dq rad_port_id -value allows to specify what should be sent to the RADIUS server as +value specifies what should be sent to the RADIUS server as NAS-Port-Id. The .Ar option Ns No s From owner-svn-src-stable-10@freebsd.org Thu Mar 30 01:17:47 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AD9EDD24DEF; Thu, 30 Mar 2017 01:17:47 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6B5F475D; Thu, 30 Mar 2017 01:17:47 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2U1HkKb081640; Thu, 30 Mar 2017 01:17:46 GMT (envelope-from sevan@FreeBSD.org) Received: (from sevan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2U1HkLT081639; Thu, 30 Mar 2017 01:17:46 GMT (envelope-from sevan@FreeBSD.org) Message-Id: <201703300117.v2U1HkLT081639@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sevan set sender to sevan@FreeBSD.org using -f From: Sevan Janiyan Date: Thu, 30 Mar 2017 01:17:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r316189 - stable/10/usr.sbin/wpa/wpa_cli X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Mar 2017 01:17:47 -0000 Author: sevan (doc committer) Date: Thu Mar 30 01:17:46 2017 New Revision: 316189 URL: https://svnweb.freebsd.org/changeset/base/316189 Log: MFC 312684 Extend manual to cover more commands and options. PR: 203406 Submitted by: Fehmi Noyan Isi (fnoyanisi AT yahoo DOT com) Approved by: wblock (mentor) Differential Revision: https://reviews.freebsd.org/D8691 Modified: stable/10/usr.sbin/wpa/wpa_cli/wpa_cli.8 Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/wpa/wpa_cli/wpa_cli.8 ============================================================================== --- stable/10/usr.sbin/wpa/wpa_cli/wpa_cli.8 Thu Mar 30 01:03:07 2017 (r316188) +++ stable/10/usr.sbin/wpa/wpa_cli/wpa_cli.8 Thu Mar 30 01:17:46 2017 (r316189) @@ -24,15 +24,22 @@ .\" .\" $FreeBSD$ .\" -.Dd June 16, 2005 +.Dd January 24, 2017 .Dt WPA_CLI 8 .Os .Sh NAME .Nm wpa_cli .Nd "text-based frontend program for interacting with wpa_supplicant" .Sh SYNOPSIS -.Nm -.Op Ar commands +.Nm wpa_cli +.Op Fl p Ar path_to_ctrl_sockets +.Op Fl i Ar ifname +.Op Fl hvB +.Op Fl a Ar action_file +.Op Fl P Ar pid_file +.Op Fl g Ar global_ctrl +.Op Fl G Ar ping_interval +.Ar command ... .Sh DESCRIPTION The .Nm @@ -144,26 +151,75 @@ Example request for generic token card c CTRL-REQ-OTP-2:Challenge 1235663 needed for SSID foobar > otp 2 9876 .Ed +.Sh OPTIONS +These options are available: +.Bl -tag -width indent +.It Fl p Ar path +Control sockets path. +This should match the +.Ic ctrl_interface +in +.Xr wpa_supplicant.conf 5 . +The default path is +.Pa /var/run/wpa_supplicant . +.It Fl i Ar ifname +Interface to be configured. +By default, the first interface found in the socket path is used. +.It Fl h +Show help. +.It Fl v +Show version information. +.It Fl B +Run the daemon in the background. +.It Fl a Ar action_file +Run in daemon mode, executing the action file based on events from +.Xr wpa_supplicant 8 . +.It Fl P Ar pid_file +PID file location. +.It Fl g Ar global_ctrl +Use a global control interface to +.Xr wpa_supplicant 8 +rather than the default Unix domain sockets. +.It Fl G Ar ping_interval +Wait +.Dq ping_interval +seconds before sending each ping to +.Xr wpa_supplicant 8 . +See the +.Ic ping +command. +.It command +See available commands in the next section. +.El .Sh COMMANDS -The following commands may be supplied on the command line +These commands can be supplied on the command line or at a prompt when operating interactively. .Bl -tag -width indent .It Ic status Report the current WPA/EAPOL/EAP status for the current interface. +.It Ic ifname +Show the current interface name. +The default interface is the first interface found in the socket path. +.It Ic ping +Ping the +.Xr wpa_supplicant 8 +utility. +This command can be used to test the status of the +.Xr wpa_supplicant 8 +daemon. .It Ic mib Report MIB variables (dot1x, dot11) for the current interface. .It Ic help Show usage help. .It Ic interface Op Ar ifname Show available interfaces and/or set the current interface -when multiple are available. +when multiple interfaces are available. .It Ic level Ar debug_level Change the debugging level in .Xr wpa_supplicant 8 . Larger numbers generate more messages. .It Ic license -Display the full -license for +Display the full license for .Nm . .It Ic logoff Send the IEEE 802.1X EAPOL state machine into the @@ -192,12 +248,68 @@ Force preauthentication of the specified Configure an identity for an SSID. .It Ic password Ar network_id password Configure a password for an SSID. +.It Ic new_password Ar network_id password +Change the password for an SSID. +.It Ic PIN Ar network_id pin +Configure a PIN for an SSID. +.It Ic passphrase Ar network_id passphrase +Configure a private key passphrase for an SSID. +.It Ic bssid Ar network_id bssid +Set a preferred BSSID for an SSID +.It Ic blacklist Op Ar bssid | clear +Add a BSSID to the blacklist. +When invoked without any extra arguments, display the blacklist. +Specifying +.Ar clear +causes +.Nm +to clear the blacklist. +.It Ic list_networks +List configured networks. +.It Ic select_network Ar network_id +Select a network and disable others. +.It Ic enable_network Ar network_id +Enable a network. +.It Ic disable_network Ar network_id +Disable a network. +.It Ic add_network +Add a network. +.It Ic remove_network Ar network_id +Remove a network. +.It Ic set_network Op Ar network_id variable value +Set network variables. +Shows a list of variables when run without arguments. +.It Ic get_network Ar network_id variable +Get network variables. +.It Ic disconnect +Disconnect and wait for reassociate/reconnect command before connecting. +.It Ic reconnect +Similar to +.Ic reassociate , +but only takes effect if already disconnected. +.It Ic scan +Request new BSS scan. +.It Ic scan_results +Get the latest BSS scan results. +This command can be invoked after running a BSS scan with +.Ic scan . +.It Ic bss Op Ar idx | bssid +Get a detailed BSS scan result for the network identified by +.Dq bssid +or +.Dq idx . .It Ic otp Ar network_id password Configure a one-time password for an SSID. .It Ic terminate Force .Xr wpa_supplicant 8 to terminate. +.It Ic interface_add Ar ifname Op Ar confname driver ctrl_interface driver_param bridge_name +Add a new interface with the given parameters. +.It Ic interface_remove Ar ifname +Remove the interface. +.It Ic interface_list +List available interfaces. .It Ic quit Exit .Nm . @@ -217,6 +329,8 @@ utility was written by .An Jouni Malinen Aq j@w1.fi . This manual page is derived from the .Pa README -file included in the +and +.Pa wpa_cli.c +files included in the .Nm wpa_supplicant distribution. From owner-svn-src-stable-10@freebsd.org Thu Mar 30 01:37:38 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B92F3D24473; Thu, 30 Mar 2017 01:37:38 +0000 (UTC) (envelope-from jamie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 85B9AD80; Thu, 30 Mar 2017 01:37:38 +0000 (UTC) (envelope-from jamie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2U1bbOX090115; Thu, 30 Mar 2017 01:37:37 GMT (envelope-from jamie@FreeBSD.org) Received: (from jamie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2U1bbaP090114; Thu, 30 Mar 2017 01:37:37 GMT (envelope-from jamie@FreeBSD.org) Message-Id: <201703300137.v2U1bbaP090114@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jamie set sender to jamie@FreeBSD.org using -f From: Jamie Gritton Date: Thu, 30 Mar 2017 01:37:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r316193 - stable/10/usr.sbin/jail X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Mar 2017 01:37:38 -0000 Author: jamie Date: Thu Mar 30 01:37:37 2017 New Revision: 316193 URL: https://svnweb.freebsd.org/changeset/base/316193 Log: MFC r316022,r316023: Fix hexadecimal escape codes in jail.conf(5). PR: 218154 Submitted by: Masahiro Konishi Modified: stable/10/usr.sbin/jail/jaillex.l Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/jail/jaillex.l ============================================================================== --- stable/10/usr.sbin/jail/jaillex.l Thu Mar 30 01:37:34 2017 (r316192) +++ stable/10/usr.sbin/jail/jaillex.l Thu Mar 30 01:37:37 2017 (r316193) @@ -216,7 +216,7 @@ text2lval(size_t triml, size_t trimr, in *d = *++s - '0'; else if (s[1] >= 'A' && s[1] <= 'F') *d = *++s + (0xA - 'A'); - else if (s[1] >= 'a' && s[1] <= 'a') + else if (s[1] >= 'a' && s[1] <= 'f') *d = *++s + (0xa - 'a'); else break; @@ -226,7 +226,7 @@ text2lval(size_t triml, size_t trimr, in *d = *d * 0x10 + (*++s - '0'); else if (s[1] >= 'A' && s[1] <= 'F') *d = *d * 0x10 + (*++s + (0xA - 'A')); - else if (s[1] >= 'a' && s[1] <= 'a') + else if (s[1] >= 'a' && s[1] <= 'f') *d = *d * 0x10 + (*++s + (0xa - 'a')); } } From owner-svn-src-stable-10@freebsd.org Thu Mar 30 01:48:38 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 53E4BD240F6; Thu, 30 Mar 2017 01:48:38 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 207ABCC5; Thu, 30 Mar 2017 01:48:38 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2U1mbwg094178; Thu, 30 Mar 2017 01:48:37 GMT (envelope-from sevan@FreeBSD.org) Received: (from sevan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2U1mb3r094177; Thu, 30 Mar 2017 01:48:37 GMT (envelope-from sevan@FreeBSD.org) Message-Id: <201703300148.v2U1mb3r094177@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sevan set sender to sevan@FreeBSD.org using -f From: Sevan Janiyan Date: Thu, 30 Mar 2017 01:48:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r316194 - stable/10/usr.bin/systat X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Mar 2017 01:48:38 -0000 Author: sevan (doc committer) Date: Thu Mar 30 01:48:36 2017 New Revision: 316194 URL: https://svnweb.freebsd.org/changeset/base/316194 Log: MFC r309552 Fix error in the example section Adjust formatting highlighted by igor. PR: 214683 Submitted by: Anindya Mukherjee Reviewed by: jilles Approved by: bcr (mentor) Differential Revision: https://reviews.freebsd.org/D8591 Modified: stable/10/usr.bin/systat/systat.1 Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/systat/systat.1 ============================================================================== --- stable/10/usr.bin/systat/systat.1 Thu Mar 30 01:37:37 2017 (r316193) +++ stable/10/usr.bin/systat/systat.1 Thu Mar 30 01:48:36 2017 (r316194) @@ -28,7 +28,7 @@ .\" @(#)systat.1 8.2 (Berkeley) 12/30/93 .\" $FreeBSD$ .\" -.Dd October 24, 2015 +.Dd December 5, 2016 .Dt SYSTAT 1 .Os .Sh NAME @@ -110,6 +110,26 @@ The .Ar refresh-value specifies the screen refresh time interval in seconds. Time interval can be fractional. +.It Ar display-commands +A list of commands specific to this display. +These commands can also be entered interactively and are described for +each display separately below. +If the command requires arguments, they can be specified as separate +command line arguments. +A command line argument +.Fl - +will finish display commands. +For example: +.Pp +.Dl Nm Fl ifstat Fl match Ar bge0,em1 Fl pps +.Pp +This will display statistics of packets per second for network interfaces +named as bge0 and em1. +.Pp +.Dl Nm Fl iostat Fl numbers Fl - Ar 2.1 +.Pp +This will display all IO statistics in a numeric format and the information +will be refreshed each 2.1 seconds. .El .Pp Certain characters cause immediate action by From owner-svn-src-stable-10@freebsd.org Thu Mar 30 01:57:33 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DF130D248BB; Thu, 30 Mar 2017 01:57:33 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AE61593D; Thu, 30 Mar 2017 01:57:33 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2U1vWPd098303; Thu, 30 Mar 2017 01:57:32 GMT (envelope-from sevan@FreeBSD.org) Received: (from sevan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2U1vWEa098302; Thu, 30 Mar 2017 01:57:32 GMT (envelope-from sevan@FreeBSD.org) Message-Id: <201703300157.v2U1vWEa098302@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sevan set sender to sevan@FreeBSD.org using -f From: Sevan Janiyan Date: Thu, 30 Mar 2017 01:57:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r316196 - stable/10/usr.bin/find X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Mar 2017 01:57:34 -0000 Author: sevan (doc committer) Date: Thu Mar 30 01:57:32 2017 New Revision: 316196 URL: https://svnweb.freebsd.org/changeset/base/316196 Log: MFC r281759 find.1: Add missing whitespace: Obtained from: Dragonfly (dee38d02d51cc8316f82b0263158d2546f2398bc) Modified: stable/10/usr.bin/find/find.1 Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/find/find.1 ============================================================================== --- stable/10/usr.bin/find/find.1 Thu Mar 30 01:52:02 2017 (r316195) +++ stable/10/usr.bin/find/find.1 Thu Mar 30 01:57:32 2017 (r316196) @@ -1003,7 +1003,7 @@ and as well as .Ic -amin , -anewer , -cmin , -cnewer , -delete , -empty , -fstype , .Ic -iname , -inum , -iregex , -ls , -maxdepth , -mindepth , -mmin , -.Ic -path , -print0 , -regex, -sparse +.Ic -path , -print0 , -regex , -sparse and all of the .Ic -B* birthtime related primaries are extensions to From owner-svn-src-stable-10@freebsd.org Thu Mar 30 02:00:44 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 14527D24B46; Thu, 30 Mar 2017 02:00:44 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D5136C53; Thu, 30 Mar 2017 02:00:43 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2U20g4o099392; Thu, 30 Mar 2017 02:00:42 GMT (envelope-from sevan@FreeBSD.org) Received: (from sevan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2U20gXR099391; Thu, 30 Mar 2017 02:00:42 GMT (envelope-from sevan@FreeBSD.org) Message-Id: <201703300200.v2U20gXR099391@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sevan set sender to sevan@FreeBSD.org using -f From: Sevan Janiyan Date: Thu, 30 Mar 2017 02:00:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r316197 - stable/10/usr.bin/find X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Mar 2017 02:00:44 -0000 Author: sevan (doc committer) Date: Thu Mar 30 02:00:42 2017 New Revision: 316197 URL: https://svnweb.freebsd.org/changeset/base/316197 Log: MFC r312692 Improve wording when describing -mmin. PR: 215922 Submitted by: danielsh AT apache DOT org Approved by: bcr (mentor) Differential Revision: https://reviews.freebsd.org/D9313 Modified: stable/10/usr.bin/find/find.1 Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/find/find.1 ============================================================================== --- stable/10/usr.bin/find/find.1 Thu Mar 30 01:57:32 2017 (r316196) +++ stable/10/usr.bin/find/find.1 Thu Mar 30 02:00:42 2017 (r316197) @@ -31,7 +31,7 @@ .\" @(#)find.1 8.7 (Berkeley) 5/9/95 .\" $FreeBSD$ .\" -.Dd January 5, 2014 +.Dd January 24, 2017 .Dt FIND 1 .Os .Sh NAME @@ -560,6 +560,7 @@ processes all but the command line argum True if the difference between the file last modification time and the time .Nm was started, rounded up to the next full minute, is +more than .Ar n .Pq + Ns Ar n , less than From owner-svn-src-stable-10@freebsd.org Thu Mar 30 02:02:49 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 647B5D24F48; Thu, 30 Mar 2017 02:02:49 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3139A1D0; Thu, 30 Mar 2017 02:02:49 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2U22mMm002792; Thu, 30 Mar 2017 02:02:48 GMT (envelope-from sevan@FreeBSD.org) Received: (from sevan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2U22mnQ002791; Thu, 30 Mar 2017 02:02:48 GMT (envelope-from sevan@FreeBSD.org) Message-Id: <201703300202.v2U22mnQ002791@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sevan set sender to sevan@FreeBSD.org using -f From: Sevan Janiyan Date: Thu, 30 Mar 2017 02:02:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r316198 - stable/10/usr.sbin/makefs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Mar 2017 02:02:49 -0000 Author: sevan (doc committer) Date: Thu Mar 30 02:02:48 2017 New Revision: 316198 URL: https://svnweb.freebsd.org/changeset/base/316198 Log: MFC r309192 Fix null dereference when running out of nodes during rename. PR: 212370 Submitted by: Sascha Wildner Reviewed by: bcr (mentor) Approved by: bapt Obtained from: NetBSD Differential Revision: https://reviews.freebsd.org/D8643 Modified: stable/10/usr.sbin/makefs/cd9660.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/makefs/cd9660.c ============================================================================== --- stable/10/usr.sbin/makefs/cd9660.c Thu Mar 30 02:00:42 2017 (r316197) +++ stable/10/usr.sbin/makefs/cd9660.c Thu Mar 30 02:02:48 2017 (r316198) @@ -1066,7 +1066,7 @@ cd9660_rename_filename(cd9660node *iter, tmp = malloc(ISO_FILENAME_MAXLENGTH_WITH_PADDING); - while (i < num) { + while (i < num && iter) { powers = 1; count = 0; digits = 1; From owner-svn-src-stable-10@freebsd.org Thu Mar 30 02:16:35 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7D789D24D33; Thu, 30 Mar 2017 02:16:35 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4A16467; Thu, 30 Mar 2017 02:16:35 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2U2GY8q007005; Thu, 30 Mar 2017 02:16:34 GMT (envelope-from sevan@FreeBSD.org) Received: (from sevan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2U2GYaj007004; Thu, 30 Mar 2017 02:16:34 GMT (envelope-from sevan@FreeBSD.org) Message-Id: <201703300216.v2U2GYaj007004@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sevan set sender to sevan@FreeBSD.org using -f From: Sevan Janiyan Date: Thu, 30 Mar 2017 02:16:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r316200 - stable/10/bin/dd X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Mar 2017 02:16:35 -0000 Author: sevan (doc committer) Date: Thu Mar 30 02:16:34 2017 New Revision: 316200 URL: https://svnweb.freebsd.org/changeset/base/316200 Log: MFC r270771 Add canonical population of a disk / thumb drive from an image example. Modified: stable/10/bin/dd/dd.1 Directory Properties: stable/10/ (props changed) Modified: stable/10/bin/dd/dd.1 ============================================================================== --- stable/10/bin/dd/dd.1 Thu Mar 30 02:03:34 2017 (r316199) +++ stable/10/bin/dd/dd.1 Thu Mar 30 02:16:34 2017 (r316200) @@ -408,6 +408,11 @@ To create an image of a Mode-1 CD-ROM, w for data CD-ROM disks, use a block size of 2048 bytes: .Pp .Dl "dd if=/dev/acd0 of=filename.iso bs=2048" +.Pp +Write a filesystem image to a memory stick, padding the end with zeros, +if necessary, to a 1MiB boundary: +.Pp +.Dl "dd if=memstick.img of=/dev/da0 bs=1m conv=noerror,sync" .Sh SEE ALSO .Xr cp 1 , .Xr mt 1 , From owner-svn-src-stable-10@freebsd.org Thu Mar 30 02:17:49 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A78B4D24F6F; Thu, 30 Mar 2017 02:17:49 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 76CF623A; Thu, 30 Mar 2017 02:17:49 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2U2HmfH007097; Thu, 30 Mar 2017 02:17:48 GMT (envelope-from sevan@FreeBSD.org) Received: (from sevan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2U2Hme4007096; Thu, 30 Mar 2017 02:17:48 GMT (envelope-from sevan@FreeBSD.org) Message-Id: <201703300217.v2U2Hme4007096@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sevan set sender to sevan@FreeBSD.org using -f From: Sevan Janiyan Date: Thu, 30 Mar 2017 02:17:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r316201 - stable/10/bin/dd X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Mar 2017 02:17:49 -0000 Author: sevan (doc committer) Date: Thu Mar 30 02:17:48 2017 New Revision: 316201 URL: https://svnweb.freebsd.org/changeset/base/316201 Log: MFC r270831 Update the date for last example. Sponsored by: Netflix Modified: stable/10/bin/dd/dd.1 Directory Properties: stable/10/ (props changed) Modified: stable/10/bin/dd/dd.1 ============================================================================== --- stable/10/bin/dd/dd.1 Thu Mar 30 02:16:34 2017 (r316200) +++ stable/10/bin/dd/dd.1 Thu Mar 30 02:17:48 2017 (r316201) @@ -32,7 +32,7 @@ .\" @(#)dd.1 8.2 (Berkeley) 1/13/94 .\" $FreeBSD$ .\" -.Dd April 2, 2014 +.Dd August 28, 2014 .Dt DD 1 .Os .Sh NAME From owner-svn-src-stable-10@freebsd.org Thu Mar 30 02:19:43 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5680FD25116; Thu, 30 Mar 2017 02:19:43 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 25D15674; Thu, 30 Mar 2017 02:19:43 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2U2JgZe007227; Thu, 30 Mar 2017 02:19:42 GMT (envelope-from sevan@FreeBSD.org) Received: (from sevan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2U2Jgv9007226; Thu, 30 Mar 2017 02:19:42 GMT (envelope-from sevan@FreeBSD.org) Message-Id: <201703300219.v2U2Jgv9007226@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sevan set sender to sevan@FreeBSD.org using -f From: Sevan Janiyan Date: Thu, 30 Mar 2017 02:19:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r316202 - stable/10/bin/dd X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Mar 2017 02:19:43 -0000 Author: sevan (doc committer) Date: Thu Mar 30 02:19:42 2017 New Revision: 316202 URL: https://svnweb.freebsd.org/changeset/base/316202 Log: MFC r285645 Mention the dd-like recoverdisk(1) to help folks find this great BSD command. Modified: stable/10/bin/dd/dd.1 Directory Properties: stable/10/ (props changed) Modified: stable/10/bin/dd/dd.1 ============================================================================== --- stable/10/bin/dd/dd.1 Thu Mar 30 02:17:48 2017 (r316201) +++ stable/10/bin/dd/dd.1 Thu Mar 30 02:19:42 2017 (r316202) @@ -416,6 +416,7 @@ if necessary, to a 1MiB boundary: .Sh SEE ALSO .Xr cp 1 , .Xr mt 1 , +.Xr recoverdisk 1 , .Xr tr 1 , .Xr geom 4 .Sh STANDARDS From owner-svn-src-stable-10@freebsd.org Thu Mar 30 02:23:04 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5E871D25498; Thu, 30 Mar 2017 02:23:04 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 291B3D0E; Thu, 30 Mar 2017 02:23:04 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2U2N38q010903; Thu, 30 Mar 2017 02:23:03 GMT (envelope-from sevan@FreeBSD.org) Received: (from sevan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2U2N3Mp010902; Thu, 30 Mar 2017 02:23:03 GMT (envelope-from sevan@FreeBSD.org) Message-Id: <201703300223.v2U2N3Mp010902@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sevan set sender to sevan@FreeBSD.org using -f From: Sevan Janiyan Date: Thu, 30 Mar 2017 02:23:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r316203 - stable/10/bin/dd X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Mar 2017 02:23:04 -0000 Author: sevan (doc committer) Date: Thu Mar 30 02:23:02 2017 New Revision: 316203 URL: https://svnweb.freebsd.org/changeset/base/316203 Log: MFC r306715 Add history section for dd(1) First version of UNIX to include dd found using TUHS http://minnie.tuhs.org/cgi-bin/utree.pl?file=V5/usr/source/s1/dd.c PR: 211777 Approved by: bcr (mentor) Differential Revision: https://reviews.freebsd.org/D8104 Modified: stable/10/bin/dd/dd.1 Directory Properties: stable/10/ (props changed) Modified: stable/10/bin/dd/dd.1 ============================================================================== --- stable/10/bin/dd/dd.1 Thu Mar 30 02:19:42 2017 (r316202) +++ stable/10/bin/dd/dd.1 Thu Mar 30 02:23:02 2017 (r316203) @@ -32,7 +32,7 @@ .\" @(#)dd.1 8.2 (Berkeley) 1/13/94 .\" $FreeBSD$ .\" -.Dd August 28, 2014 +.Dd October 5, 2016 .Dt DD 1 .Os .Sh NAME @@ -440,6 +440,11 @@ and values are extensions to the .Tn POSIX standard. +.Sh HISTORY +A +.Nm +command appeared in +.At v5 . .Sh BUGS Protection mechanisms in the .Xr geom 4 From owner-svn-src-stable-10@freebsd.org Thu Mar 30 02:28:50 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B3D64D259EF; Thu, 30 Mar 2017 02:28:50 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 82F101D5; Thu, 30 Mar 2017 02:28:50 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2U2Sn2b011110; Thu, 30 Mar 2017 02:28:49 GMT (envelope-from sevan@FreeBSD.org) Received: (from sevan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2U2Sn2H011109; Thu, 30 Mar 2017 02:28:49 GMT (envelope-from sevan@FreeBSD.org) Message-Id: <201703300228.v2U2Sn2H011109@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sevan set sender to sevan@FreeBSD.org using -f From: Sevan Janiyan Date: Thu, 30 Mar 2017 02:28:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r316204 - stable/10/sbin/shutdown X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Mar 2017 02:28:50 -0000 Author: sevan (doc committer) Date: Thu Mar 30 02:28:49 2017 New Revision: 316204 URL: https://svnweb.freebsd.org/changeset/base/316204 Log: MFC r306617 shutdown appeared as a standalone utility in 4.1BSD. http://mail-index.netbsd.org/source-changes-d/2016/09/13/msg008686.html http://mail-index.netbsd.org/source-changes-d/2016/09/14/msg008691.html PR: 212552 Approved by: bcr (mentor) Obtained from: NetBSD Differential Revision: https://reviews.freebsd.org/D8105 Modified: stable/10/sbin/shutdown/shutdown.8 Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/shutdown/shutdown.8 ============================================================================== --- stable/10/sbin/shutdown/shutdown.8 Thu Mar 30 02:23:02 2017 (r316203) +++ stable/10/sbin/shutdown/shutdown.8 Thu Mar 30 02:28:49 2017 (r316204) @@ -28,7 +28,7 @@ .\" @(#)shutdown.8 8.2 (Berkeley) 4/27/95 .\" $FreeBSD$ .\" -.Dd March 19, 2013 +.Dd September 21, 2016 .Dt SHUTDOWN 8 .Os .Sh NAME @@ -206,7 +206,9 @@ a colon (``:'') for backward compatibili .Xr init 8 , .Xr reboot 8 .Sh HISTORY -The +A .Nm -utility appeared in -.Bx 4.0 . +command was originally written by Ian Johnstone for UNSW's modified +.At "6th Edn" . +It was modified and then incorporated in +.Bx 4.1 . From owner-svn-src-stable-10@freebsd.org Thu Mar 30 02:32:40 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2160AD25D99; Thu, 30 Mar 2017 02:32:40 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E208B9A5; Thu, 30 Mar 2017 02:32:39 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2U2WdRA014768; Thu, 30 Mar 2017 02:32:39 GMT (envelope-from sevan@FreeBSD.org) Received: (from sevan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2U2WdV5014767; Thu, 30 Mar 2017 02:32:39 GMT (envelope-from sevan@FreeBSD.org) Message-Id: <201703300232.v2U2WdV5014767@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sevan set sender to sevan@FreeBSD.org using -f From: Sevan Janiyan Date: Thu, 30 Mar 2017 02:32:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r316205 - stable/10/sbin/setkey X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Mar 2017 02:32:40 -0000 Author: sevan (doc committer) Date: Thu Mar 30 02:32:38 2017 New Revision: 316205 URL: https://svnweb.freebsd.org/changeset/base/316205 Log: MFC r306616 setkey appeared in FreeBSD 4.0 PR: 212551 Approved by: bcr (mentor) Differential Revision: https://reviews.freebsd.org/D8105 Modified: stable/10/sbin/setkey/setkey.8 Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/setkey/setkey.8 ============================================================================== --- stable/10/sbin/setkey/setkey.8 Thu Mar 30 02:28:49 2017 (r316204) +++ stable/10/sbin/setkey/setkey.8 Thu Mar 30 02:32:38 2017 (r316205) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 25, 2014 +.Dd October 3, 2016 .Dt SETKEY 8 .Os .\" @@ -713,6 +713,8 @@ The .Nm utility first appeared in WIDE Hydrangea IPv6 protocol stack kit. The utility was completely re-designed in June 1998. +It first appeared in +.Fx 4.0 . .\" .Sh BUGS The From owner-svn-src-stable-10@freebsd.org Thu Mar 30 02:37:39 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 510E1D2516D; Thu, 30 Mar 2017 02:37:39 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1D979EE1; Thu, 30 Mar 2017 02:37:39 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2U2bcWn015025; Thu, 30 Mar 2017 02:37:38 GMT (envelope-from sevan@FreeBSD.org) Received: (from sevan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2U2bc5T015024; Thu, 30 Mar 2017 02:37:38 GMT (envelope-from sevan@FreeBSD.org) Message-Id: <201703300237.v2U2bc5T015024@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sevan set sender to sevan@FreeBSD.org using -f From: Sevan Janiyan Date: Thu, 30 Mar 2017 02:37:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r316207 - stable/10/sbin/fsck X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Mar 2017 02:37:39 -0000 Author: sevan (doc committer) Date: Thu Mar 30 02:37:37 2017 New Revision: 316207 URL: https://svnweb.freebsd.org/changeset/base/316207 Log: MFC r266586 If called without -T or -t, fsck attempts to detect the file system type. If this fails, fsck will fail with "unknown file system type" message. PR: 188214 Modified: stable/10/sbin/fsck/fsck.8 Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/fsck/fsck.8 ============================================================================== --- stable/10/sbin/fsck/fsck.8 Thu Mar 30 02:34:21 2017 (r316206) +++ stable/10/sbin/fsck/fsck.8 Thu Mar 30 02:37:37 2017 (r316207) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 25, 2009 +.Dd May 23, 2014 .Dt FSCK 8 .Os .Sh NAME @@ -111,6 +111,18 @@ The disk drive containing each file syst of the device name that ends in a digit; the remaining characters are assumed to be the partition and slice designators. .Pp +If the +.Fl t +or +.Fl T +flags are not specified, +.Nm +will attempt to determine the file system type and call the +appropriated file system check utility. +Failure to detect the file system type will cause +.Nm +to fail with a message that the partition has an unknown file system type. +.Pp The options are as follows: .Bl -tag -width indent .It Fl C From owner-svn-src-stable-10@freebsd.org Thu Mar 30 02:38:39 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E4186D25238; Thu, 30 Mar 2017 02:38:39 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B0D84B6; Thu, 30 Mar 2017 02:38:39 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2U2cc4Z015169; Thu, 30 Mar 2017 02:38:38 GMT (envelope-from sevan@FreeBSD.org) Received: (from sevan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2U2cc7J015168; Thu, 30 Mar 2017 02:38:38 GMT (envelope-from sevan@FreeBSD.org) Message-Id: <201703300238.v2U2cc7J015168@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sevan set sender to sevan@FreeBSD.org using -f From: Sevan Janiyan Date: Thu, 30 Mar 2017 02:38:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r316209 - stable/10/sbin/fsck X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Mar 2017 02:38:40 -0000 Author: sevan (doc committer) Date: Thu Mar 30 02:38:38 2017 New Revision: 316209 URL: https://svnweb.freebsd.org/changeset/base/316209 Log: MFC r306733 Add history section to fsck(8) PR: 212472 Approved by: bcr (mentor) Differential Revision: https://reviews.freebsd.org/D8104 Modified: stable/10/sbin/fsck/fsck.8 Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/fsck/fsck.8 ============================================================================== --- stable/10/sbin/fsck/fsck.8 Thu Mar 30 02:38:30 2017 (r316208) +++ stable/10/sbin/fsck/fsck.8 Thu Mar 30 02:38:38 2017 (r316209) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 23, 2014 +.Dd October 5, 2016 .Dt FSCK 8 .Os .Sh NAME @@ -229,3 +229,15 @@ file system table .Xr fsck_ffs 8 , .Xr fsck_msdosfs 8 , .Xr mount 8 +.Sh HISTORY +A +.Nm +utility appeared in +.Bx 4.0 . +It was reimplemented as a filesystem independent wrapper in +.Nx 1.3 +and first appeared in +.Fx 5.0 . +The original filesystem specific utility became +.Xr fsck_ffs 8 +at this point. From owner-svn-src-stable-10@freebsd.org Thu Mar 30 05:13:53 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5DC77D2530B; Thu, 30 Mar 2017 05:13:53 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2CF44ED7; Thu, 30 Mar 2017 05:13:53 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2U5Dq3Y080075; Thu, 30 Mar 2017 05:13:52 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2U5Dq5Y080074; Thu, 30 Mar 2017 05:13:52 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201703300513.v2U5Dq5Y080074@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 30 Mar 2017 05:13:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r316216 - stable/10/lib/libc/gen X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Mar 2017 05:13:53 -0000 Author: ngie Date: Thu Mar 30 05:13:52 2017 New Revision: 316216 URL: https://svnweb.freebsd.org/changeset/base/316216 Log: MFC r315734: style(9): sort #includes Modified: stable/10/lib/libc/gen/getttyent.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/gen/getttyent.c ============================================================================== --- stable/10/lib/libc/gen/getttyent.c Thu Mar 30 05:13:47 2017 (r316215) +++ stable/10/lib/libc/gen/getttyent.c Thu Mar 30 05:13:52 2017 (r316216) @@ -33,14 +33,14 @@ static char sccsid[] = "@(#)getttyent.c #include __FBSDID("$FreeBSD$"); -#include +#include +#include + +#include #include #include -#include #include - -#include -#include +#include static char zapchar; static FILE *tf; From owner-svn-src-stable-10@freebsd.org Thu Mar 30 05:15:01 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E67D7D253F2; Thu, 30 Mar 2017 05:15:01 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B5F30141; Thu, 30 Mar 2017 05:15:01 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2U5F01x080250; Thu, 30 Mar 2017 05:15:00 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2U5F0LE080249; Thu, 30 Mar 2017 05:15:00 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201703300515.v2U5F0LE080249@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 30 Mar 2017 05:15:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r316218 - stable/10/sys/conf X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Mar 2017 05:15:02 -0000 Author: ngie Date: Thu Mar 30 05:15:00 2017 New Revision: 316218 URL: https://svnweb.freebsd.org/changeset/base/316218 Log: MFC r314372: Use "build" instead of "all" when building ports modules "all" in ports currently means "stage the ports", which requires root today, and brings to light other potential issues, like ENAMETOOLONG with staged directories (bug 161481, etc). This fixes buildkernel for me when run as a non-root user, assuming all of the prerequisites have been installed beforehand and are up-to-date. Discussed with: swills (IRC) Modified: stable/10/sys/conf/kern.post.mk Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/conf/kern.post.mk ============================================================================== --- stable/10/sys/conf/kern.post.mk Thu Mar 30 05:14:52 2017 (r316217) +++ stable/10/sys/conf/kern.post.mk Thu Mar 30 05:15:00 2017 (r316218) @@ -66,7 +66,7 @@ PORTSMODULESENV=\ all: .for __i in ${PORTS_MODULES} @${ECHO} "===> Ports module ${__i} (all)" - cd $${PORTSDIR:-/usr/ports}/${__i}; ${PORTSMODULESENV} ${MAKE} -B clean all + cd $${PORTSDIR:-/usr/ports}/${__i}; ${PORTSMODULESENV} ${MAKE} -B clean build .endfor .for __target in install reinstall clean From owner-svn-src-stable-10@freebsd.org Thu Mar 30 05:17:24 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9201FD25523; Thu, 30 Mar 2017 05:17:24 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 617227DA; Thu, 30 Mar 2017 05:17:24 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2U5HNr8080524; Thu, 30 Mar 2017 05:17:23 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2U5HNft080523; Thu, 30 Mar 2017 05:17:23 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201703300517.v2U5HNft080523@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 30 Mar 2017 05:17:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r316221 - stable/10/sbin/mount X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Mar 2017 05:17:24 -0000 Author: ngie Date: Thu Mar 30 05:17:23 2017 New Revision: 316221 URL: https://svnweb.freebsd.org/changeset/base/316221 Log: MFC r315774: mount.conf(8): fix a .Xr call Add the missing section number for devfs(5) Modified: stable/10/sbin/mount/mount.conf.8 Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/mount/mount.conf.8 ============================================================================== --- stable/10/sbin/mount/mount.conf.8 Thu Mar 30 05:16:41 2017 (r316220) +++ stable/10/sbin/mount/mount.conf.8 Thu Mar 30 05:17:23 2017 (r316221) @@ -62,7 +62,7 @@ See for the format of the config file. .It When the actual root file system is mounted, -.Xr devfs +.Xr devfs 5 will be re-mounted on the .Pa /dev directory. From owner-svn-src-stable-10@freebsd.org Thu Mar 30 05:17:53 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 845A5D255DE; Thu, 30 Mar 2017 05:17:53 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [96.47.72.37]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 50FB38E8; Thu, 30 Mar 2017 05:17:53 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2U5GblT080368; Thu, 30 Mar 2017 05:16:37 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2U5Gbal080367; Thu, 30 Mar 2017 05:16:37 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201703300516.v2U5Gbal080367@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 30 Mar 2017 05:16:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r316219 - stable/10/share/man/man9 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Mar 2017 05:17:53 -0000 Author: ngie Date: Thu Mar 30 05:16:37 2017 New Revision: 316219 URL: https://svnweb.freebsd.org/changeset/base/316219 Log: MFC r315796: bus_alloc_resource(9): fix mandoc markup Add missing comma after `.Nm bus_alloc_resource_any` in NAME section. Modified: stable/10/share/man/man9/bus_alloc_resource.9 Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man9/bus_alloc_resource.9 ============================================================================== --- stable/10/share/man/man9/bus_alloc_resource.9 Thu Mar 30 05:15:00 2017 (r316218) +++ stable/10/share/man/man9/bus_alloc_resource.9 Thu Mar 30 05:16:37 2017 (r316219) @@ -33,7 +33,7 @@ .Os .Sh NAME .Nm bus_alloc_resource , -.Nm bus_alloc_resource_any +.Nm bus_alloc_resource_any , .Nd allocate resources from a parent bus .Sh SYNOPSIS .In sys/param.h From owner-svn-src-stable-10@freebsd.org Thu Mar 30 05:25:34 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CD9F0D25AD6; Thu, 30 Mar 2017 05:25:34 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9A2F31647; Thu, 30 Mar 2017 05:25:34 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2U5PXEC084746; Thu, 30 Mar 2017 05:25:33 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2U5PXwg084745; Thu, 30 Mar 2017 05:25:33 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201703300525.v2U5PXwg084745@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 30 Mar 2017 05:25:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r316225 - stable/10/release/doc/en_US.ISO8859-1/hardware X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Mar 2017 05:25:34 -0000 Author: ngie Date: Thu Mar 30 05:25:33 2017 New Revision: 316225 URL: https://svnweb.freebsd.org/changeset/base/316225 Log: MFC r315759,r315761: r315759 (by gjb): Add mlx5en(4) to the hardware page. [1] Belatedly bump copyright years after several changes. r315761: Add cxgbe(4), ixl(4), and mlx4en(4) to the hardware release notes Modified: stable/10/release/doc/en_US.ISO8859-1/hardware/article.xml Directory Properties: stable/10/ (props changed) Modified: stable/10/release/doc/en_US.ISO8859-1/hardware/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/hardware/article.xml Thu Mar 30 05:22:02 2017 (r316224) +++ stable/10/release/doc/en_US.ISO8859-1/hardware/article.xml Thu Mar 30 05:25:33 2017 (r316225) @@ -31,6 +31,9 @@ 2012 2013 2014 + 2015 + 2016 + 2017 The &os; Documentation Project @@ -899,12 +902,18 @@ &hwlist.ixgbe; + &hwlist.ixl; + &hwlist.jme; &hwlist.kue; &hwlist.lge; + &hwlist.mlx4en; + + &hwlist.mlx5en; + &hwlist.msk; &hwlist.mxge; From owner-svn-src-stable-10@freebsd.org Thu Mar 30 05:49:47 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D3601D2545B; Thu, 30 Mar 2017 05:49:47 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 940F1BCB; Thu, 30 Mar 2017 05:49:47 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2U5nkU6093633; Thu, 30 Mar 2017 05:49:46 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2U5nk17093630; Thu, 30 Mar 2017 05:49:46 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201703300549.v2U5nk17093630@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 30 Mar 2017 05:49:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r316231 - stable/10/share/man/man4 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Mar 2017 05:49:47 -0000 Author: ngie Date: Thu Mar 30 05:49:46 2017 New Revision: 316231 URL: https://svnweb.freebsd.org/changeset/base/316231 Log: MFstable/11 r316229: Backport mlx4{en,ib}(4) from ^/head MFCing other pieces would be very structurally disruptive. This just brings back the manpages so they can be used by end-users and to ease future backports. Added: stable/10/share/man/man4/mlx4en.4 - copied unchanged from r316229, stable/11/share/man/man4/mlx4en.4 stable/10/share/man/man4/mlx4ib.4 - copied unchanged from r316229, stable/11/share/man/man4/mlx4ib.4 Modified: stable/10/share/man/man4/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man4/Makefile ============================================================================== --- stable/10/share/man/man4/Makefile Thu Mar 30 05:49:23 2017 (r316230) +++ stable/10/share/man/man4/Makefile Thu Mar 30 05:49:46 2017 (r316231) @@ -265,6 +265,7 @@ MAN= aac.4 \ mk48txx.4 \ mld.4 \ mlx.4 \ + mlx4en.4 \ mlx5en.4 \ mly.4 \ mmc.4 \ @@ -860,6 +861,10 @@ MAN+= iscsi_initiator.4 .endif +.if ${MK_OFED} != "no" +MAN+= mlx4ib.4 +.endif + .if ${MK_TESTS} != "no" ATF= ${.CURDIR}/../../../contrib/atf .PATH: ${ATF}/doc Copied: stable/10/share/man/man4/mlx4en.4 (from r316229, stable/11/share/man/man4/mlx4en.4) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/share/man/man4/mlx4en.4 Thu Mar 30 05:49:46 2017 (r316231, copy of r316229, stable/11/share/man/man4/mlx4en.4) @@ -0,0 +1,95 @@ +.\" Copyright (c) 2016 Mellanox Technologies +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS `AS IS' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd March 1, 2017 +.Dt MLX4EN 4 +.Os +.Sh NAME +.Nm mlx4en +.Nd "Mellanox ConnectX-3 10GbE/40GbE network adapter driver" +.Sh SYNOPSIS +To compile this driver into the kernel, +place these lines in your kernel configuration file: +.Bd -ragged -offset indent +.Cd "options COMPAT_LINUXKPI" +.Cd "device mlx4" +.Cd "device mlx4en" +.Ed +.Pp +To load the driver as a module at run-time, +run this command as root: +.Bd -literal -offset indent +kldload mlx4en +.Ed +.Pp +To load the driver as a +module at boot time, place this line in +.Xr loader.conf 5 : +.Bd -literal -offset indent +mlx4en_load="YES" +.Ed +.Sh DESCRIPTION +Mellanox ConnectX adapter cards with Virtual Protocol Interconnect +(VPI) provide the highest performing and most flexible interconnect +solution for Enterprise Data Centers, High-Performance Computing, and +Embedded environments. +Clustered data bases, parallelized applications, transactional +services and high-performance embedded I/O applications will achieve +significant performance improvements resulting in reduced completion +time and lower cost per operation. +.Sh HARDWARE +The +.Nm +driver supports the following network adapters: +.Pp +.Bl -bullet -compact +.It +Mellanox ConnectX-2 (ETH) +.It +Mellanox ConnectX-3 (ETH) +.El +.Sh SUPPORT +For general information and support, +go to the Mellanox support website at: +.Lk http://www.mellanox.com/ . +.Pp +If an issue is identified with this driver and a supported network adapter, +please email the specific information to +.Aq Mt freebsd-drivers@mellanox.com . +.Sh SEE ALSO +.Xr mlx4ib 4 , +.Xr ifconfig 8 +.Sh HISTORY +The +.Nm +device driver first appeared in +.Fx 9.x . +.Sh AUTHORS +.An -nosplit +The +.Nm +driver was written by +.An Mellanox Technologies . Copied: stable/10/share/man/man4/mlx4ib.4 (from r316229, stable/11/share/man/man4/mlx4ib.4) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/share/man/man4/mlx4ib.4 Thu Mar 30 05:49:46 2017 (r316231, copy of r316229, stable/11/share/man/man4/mlx4ib.4) @@ -0,0 +1,95 @@ +.\" Copyright (c) 2016 Mellanox Technologies +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS `AS IS' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd March 1, 2017 +.Dt MLX4IB 4 +.Os +.Sh NAME +.Nm mlx4ib +.Nd "Mellanox ConnectX-3 10GbE/40GbE network adapter driver" +.Sh SYNOPSIS +To compile this driver into the kernel, +place these lines in your kernel configuration file: +.Bd -ragged -offset indent +.Cd "options COMPAT_LINUXKPI" +.Cd "device mlx4" +.Cd "device mlx4ib" +.Ed +.Pp +To load the driver as a module at run-time, +run this command as root: +.Bd -literal -offset indent +kldload mlx4ib +.Ed +.Pp +To load the driver as a +module at boot time, place this line in +.Xr loader.conf 5 : +.Bd -literal -offset indent +mlx4ib_load="YES" +.Ed +.Sh DESCRIPTION +Mellanox ConnectX adapter cards with Virtual Protocol Interconnect +(VPI) provide the highest performing and most flexible interconnect +solution for Enterprise Data Centers, High-Performance Computing, and +Embedded environments. +Clustered data bases, parallelized applications, transactional +services and high-performance embedded I/O applications will achieve +significant performance improvements resulting in reduced completion +time and lower cost per operation. +.Sh HARDWARE +The +.Nm +driver supports the following network adapters: +.Pp +.Bl -bullet -compact +.It +Mellanox ConnectX-2 (IB) +.It +Mellanox ConnectX-3 (IB) +.El +.Sh SUPPORT +For general information and support, +go to the Mellanox support website at: +.Lk http://www.mellanox.com/ . +.Pp +If an issue is identified with this driver and a supported network adapter, +please email the specific information to +.Aq Mt freebsd-drivers@mellanox.com . +.Sh SEE ALSO +.Xr mlx4en 4 , +.Xr ifconfig 8 +.Sh HISTORY +The +.Nm +device driver first appeared in +.Fx 9.x . +.Sh AUTHORS +.An -nosplit +The +.Nm +driver was written by +.An Mellanox Technologies . From owner-svn-src-stable-10@freebsd.org Thu Mar 30 05:50:52 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E4714D25562; Thu, 30 Mar 2017 05:50:52 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B3F07DFC; Thu, 30 Mar 2017 05:50:52 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2U5opHw094542; Thu, 30 Mar 2017 05:50:51 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2U5oprU094541; Thu, 30 Mar 2017 05:50:51 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201703300550.v2U5oprU094541@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 30 Mar 2017 05:50:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r316233 - stable/10/share/man/man9 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Mar 2017 05:50:53 -0000 Author: ngie Date: Thu Mar 30 05:50:51 2017 New Revision: 316233 URL: https://svnweb.freebsd.org/changeset/base/316233 Log: MFC r315797: buf_ring(9): fix mandoc markup Remove spurious trailing comma after `buf_ring_peek` in the NAME section. Modified: stable/10/share/man/man9/buf_ring.9 Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man9/buf_ring.9 ============================================================================== --- stable/10/share/man/man9/buf_ring.9 Thu Mar 30 05:50:36 2017 (r316232) +++ stable/10/share/man/man9/buf_ring.9 Thu Mar 30 05:50:51 2017 (r316233) @@ -38,7 +38,7 @@ .Nm buf_ring_count , .Nm buf_ring_empty , .Nm buf_ring_full , -.Nm buf_ring_peek , +.Nm buf_ring_peek .Nd multi-producer, {single, multi}-consumer lock-less ring buffer .Sh SYNOPSIS .In sys/param.h From owner-svn-src-stable-10@freebsd.org Thu Mar 30 05:54:28 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D99FAD2581B; Thu, 30 Mar 2017 05:54:28 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A8F966B6; Thu, 30 Mar 2017 05:54:28 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2U5sRCt097518; Thu, 30 Mar 2017 05:54:27 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2U5sR2C097517; Thu, 30 Mar 2017 05:54:27 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201703300554.v2U5sR2C097517@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 30 Mar 2017 05:54:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r316235 - stable/10/usr.sbin/ctld X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Mar 2017 05:54:29 -0000 Author: ngie Date: Thu Mar 30 05:54:27 2017 New Revision: 316235 URL: https://svnweb.freebsd.org/changeset/base/316235 Log: MFC r316049: Allow WARNS to be overridden by the end-user Modified: stable/10/usr.sbin/ctld/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/ctld/Makefile ============================================================================== --- stable/10/usr.sbin/ctld/Makefile Thu Mar 30 05:54:22 2017 (r316234) +++ stable/10/usr.sbin/ctld/Makefile Thu Mar 30 05:54:27 2017 (r316235) @@ -16,7 +16,7 @@ LDADD= -lbsdxml -ll -lmd -lsbuf -lutil YFLAGS+= -v CLEANFILES= y.tab.c y.tab.h y.output -WARNS= 6 +WARNS?= 6 NO_WMISSING_VARIABLE_DECLARATIONS= .include From owner-svn-src-stable-10@freebsd.org Thu Mar 30 05:57:02 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 598CED25936; Thu, 30 Mar 2017 05:57:02 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 28E9BA19; Thu, 30 Mar 2017 05:57:02 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2U5v1VV097743; Thu, 30 Mar 2017 05:57:01 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2U5v1Fv097742; Thu, 30 Mar 2017 05:57:01 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201703300557.v2U5v1Fv097742@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 30 Mar 2017 05:57:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r316236 - stable/10/share/man/man7 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Mar 2017 05:57:02 -0000 Author: ngie Date: Thu Mar 30 05:57:01 2017 New Revision: 316236 URL: https://svnweb.freebsd.org/changeset/base/316236 Log: MFC r315789: tests(7): fix mdoc warning Continue sentence in "Configuring the tests" on a new line. Modified: stable/10/share/man/man7/tests.7 Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man7/tests.7 ============================================================================== --- stable/10/share/man/man7/tests.7 Thu Mar 30 05:54:27 2017 (r316235) +++ stable/10/share/man/man7/tests.7 Thu Mar 30 05:57:01 2017 (r316236) @@ -26,7 +26,7 @@ .\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN .\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd December 5, 2015 +.Dd March 22, 2017 .Dt TESTS 7 .Os .Sh NAME @@ -151,8 +151,9 @@ to its manual page Some test cases in the .Fx Test Suite require manual configuration by the administrator before they can be -run. Unless certain properties are defined, the tests that require them will -be skipped. +run. +Unless certain properties are defined, the tests that require them will be +skipped. .Pp Test suites are configured by defining their configuration variables in From owner-svn-src-stable-10@freebsd.org Thu Mar 30 05:57:45 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 74B48D259C5; Thu, 30 Mar 2017 05:57:45 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 417FEB5C; Thu, 30 Mar 2017 05:57:45 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2U5viFO097837; Thu, 30 Mar 2017 05:57:44 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2U5vilx097836; Thu, 30 Mar 2017 05:57:44 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201703300557.v2U5vilx097836@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 30 Mar 2017 05:57:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r316237 - stable/10/share/man/man5 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Mar 2017 05:57:45 -0000 Author: ngie Date: Thu Mar 30 05:57:44 2017 New Revision: 316237 URL: https://svnweb.freebsd.org/changeset/base/316237 Log: MFC r315772: tmpfs(5): fix mdoc warnings - Delete trailing whitespace - Sort SEE ALSO order: mmap(2)'s Xr should come before nmount(2)'s Xr. Modified: stable/10/share/man/man5/tmpfs.5 Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man5/tmpfs.5 ============================================================================== --- stable/10/share/man/man5/tmpfs.5 Thu Mar 30 05:57:01 2017 (r316236) +++ stable/10/share/man/man5/tmpfs.5 Thu Mar 30 05:57:44 2017 (r316237) @@ -97,9 +97,9 @@ current implementation. Keep this in mind when planning the mount limits, especially when expecting to place many small files on a tmpfs mount. .Pp -When +When .Xr mmap 2 -is used on a file from a tmpfs mount, the swap VM object managing the +is used on a file from a tmpfs mount, the swap VM object managing the file pages is used to implement mapping and avoid double-copying of the file data. This quirk causes process inspection tools, like @@ -147,8 +147,8 @@ memory file system: .Dl "mount -t tmpfs tmpfs /tmp" .Sh SEE ALSO .Xr procstat 1 , -.Xr nmount 2 , .Xr mmap 2 , +.Xr nmount 2 , .Xr unmount 2 , .Xr fstab 5 , .Xr mdmfs 8 , From owner-svn-src-stable-10@freebsd.org Thu Mar 30 06:00:31 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8FE4AD25AF4; Thu, 30 Mar 2017 06:00:31 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 454F5E68; Thu, 30 Mar 2017 06:00:31 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2U60Uri098147; Thu, 30 Mar 2017 06:00:30 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2U60URP098146; Thu, 30 Mar 2017 06:00:30 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201703300600.v2U60URP098146@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 30 Mar 2017 06:00:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r316239 - stable/10/share/man/man9 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Mar 2017 06:00:31 -0000 Author: ngie Date: Thu Mar 30 06:00:30 2017 New Revision: 316239 URL: https://svnweb.freebsd.org/changeset/base/316239 Log: MFC r315802: ifnet(9): fix some igor/manlint warnings - Fix typos (queueing -> queuing) [1]. - Add missing section number for polling .Xr reference [2]. Modified: stable/10/share/man/man9/ifnet.9 Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man9/ifnet.9 ============================================================================== --- stable/10/share/man/man9/ifnet.9 Thu Mar 30 05:58:31 2017 (r316238) +++ stable/10/share/man/man9/ifnet.9 Thu Mar 30 06:00:30 2017 (r316239) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 11, 2016 +.Dd March 22, 2017 .Dt IFNET 9 .Os .Sh NAME @@ -485,7 +485,7 @@ to override the default implementation. This function is exposed in order to allow drivers to manage their own queues and to reduce the latency caused by a frequently gratuitous enqueue / dequeue pair to ifq. -The suggested internal software queueing mechanism is buf_ring. +The suggested internal software queuing mechanism is buf_ring. .It Fn if_qflush Free mbufs in internally managed queues when the interface is marked down. This function must be installed after @@ -494,7 +494,7 @@ to override the default implementation. This function is exposed in order to allow drivers to manage their own queues and to reduce the latency caused by a frequently gratuitous enqueue / dequeue pair to ifq. -The suggested internal software queueing mechanism is buf_ring. +The suggested internal software queuing mechanism is buf_ring. .It Fn if_start Start queued output on an interface. This function is exposed in @@ -834,7 +834,7 @@ The actual mode change is managed by the .Fn if_ioctl routine. The -.Xr polling +.Xr polling 4 handler returns the number of packets processed. .Ss The Vt if_data Ss Structure The From owner-svn-src-stable-10@freebsd.org Thu Mar 30 06:02:41 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 47B3ED25C08; Thu, 30 Mar 2017 06:02:41 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1455563B; Thu, 30 Mar 2017 06:02:41 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2U62eni002010; Thu, 30 Mar 2017 06:02:40 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2U62eMQ002009; Thu, 30 Mar 2017 06:02:40 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201703300602.v2U62eMQ002009@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 30 Mar 2017 06:02:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r316241 - stable/10/share/man/man7 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Mar 2017 06:02:41 -0000 Author: ngie Date: Thu Mar 30 06:02:39 2017 New Revision: 316241 URL: https://svnweb.freebsd.org/changeset/base/316241 Log: MFC r315788: build(7): sort SEE ALSO section tests(7) should be grouped in the man section 7 group, not the section 8 group. Modified: stable/10/share/man/man7/build.7 Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man7/build.7 ============================================================================== --- stable/10/share/man/man7/build.7 Thu Mar 30 06:00:36 2017 (r316240) +++ stable/10/share/man/man7/build.7 Thu Mar 30 06:02:39 2017 (r316241) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 28, 2016 +.Dd March 22, 2017 .Dt BUILD 7 .Os .Sh NAME @@ -659,11 +659,11 @@ make TARGET=sparc64 DESTDIR=/clients/spa .Xr src.conf 5 , .Xr ports 7 , .Xr release 7 , +.Xr tests 7 , .Xr config 8 , .Xr mergemaster 8 , .Xr portsnap 8 , .Xr reboot 8 , -.Xr shutdown 8 , -.Xr tests 7 +.Xr shutdown 8 .Sh AUTHORS .An Mike W. Meyer Aq mwm@mired.org . From owner-svn-src-stable-10@freebsd.org Thu Mar 30 06:06:10 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C1B7FD25F35; Thu, 30 Mar 2017 06:06:10 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 90F25C2F; Thu, 30 Mar 2017 06:06:10 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2U669dY002587; Thu, 30 Mar 2017 06:06:09 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2U669Tu002586; Thu, 30 Mar 2017 06:06:09 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201703300606.v2U669Tu002586@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 30 Mar 2017 06:06:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r316245 - stable/10/share/man/man9 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Mar 2017 06:06:10 -0000 Author: ngie Date: Thu Mar 30 06:06:09 2017 New Revision: 316245 URL: https://svnweb.freebsd.org/changeset/base/316245 Log: MFC r315803: memguard(9): fix igor/manlint warnings - Expand a contraction [1]. - Add a missing section number when referring to uma(9) with .Xr . Modified: stable/10/share/man/man9/memguard.9 Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man9/memguard.9 ============================================================================== --- stable/10/share/man/man9/memguard.9 Thu Mar 30 06:05:30 2017 (r316244) +++ stable/10/share/man/man9/memguard.9 Thu Mar 30 06:06:09 2017 (r316245) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 21, 2011 +.Dd March 22, 2017 .Dt MEMGUARD 9 .Os .Sh NAME @@ -54,7 +54,7 @@ can take over and .Fn uma_free for a single -.Xr uma +.Xr uma 9 zone. Also .Nm @@ -172,7 +172,7 @@ has the 2 bit set. This option is off by default. By default .Nm -doesn't guard those +does not guard .Xr uma 9 zones that have been initialized with the .Dv UMA_ZONE_NOFREE From owner-svn-src-stable-10@freebsd.org Thu Mar 30 06:06:50 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C1AB2D25FC9; Thu, 30 Mar 2017 06:06:50 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 852A7D47; Thu, 30 Mar 2017 06:06:50 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2U66n40002745; Thu, 30 Mar 2017 06:06:49 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2U66nj4002744; Thu, 30 Mar 2017 06:06:49 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201703300606.v2U66nj4002744@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 30 Mar 2017 06:06:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r316247 - stable/10/share/man/man9 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Mar 2017 06:06:50 -0000 Author: ngie Date: Thu Mar 30 06:06:49 2017 New Revision: 316247 URL: https://svnweb.freebsd.org/changeset/base/316247 Log: MFC r315795: alq(9): fix mandoc markup Start new sentence on a new line. Modified: stable/10/share/man/man9/alq.9 Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man9/alq.9 ============================================================================== --- stable/10/share/man/man9/alq.9 Thu Mar 30 06:06:47 2017 (r316246) +++ stable/10/share/man/man9/alq.9 Thu Mar 30 06:06:49 2017 (r316247) @@ -360,8 +360,8 @@ Performance critical code paths may wish .Fn alq_getn (variable length queues) or .Fn alq_get -(fixed length queues) to avoid the extra memory copy. Note that a queue -remains locked between calls to +(fixed length queues) to avoid the extra memory copy. +Note that a queue remains locked between calls to .Fn alq_getn or .Fn alq_get From owner-svn-src-stable-10@freebsd.org Thu Mar 30 06:07:40 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1A5DAD250A4; Thu, 30 Mar 2017 06:07:40 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DDF93F19; Thu, 30 Mar 2017 06:07:39 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2U67dZi002920; Thu, 30 Mar 2017 06:07:39 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2U67dNg002919; Thu, 30 Mar 2017 06:07:39 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201703300607.v2U67dNg002919@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 30 Mar 2017 06:07:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r316249 - stable/10/share/man/man5 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Mar 2017 06:07:40 -0000 Author: ngie Date: Thu Mar 30 06:07:38 2017 New Revision: 316249 URL: https://svnweb.freebsd.org/changeset/base/316249 Log: MFC r315762: rc.conf(5): fix a .Xr call for chroot(8) Add the missing section number to the .Xr call. Modified: stable/10/share/man/man5/rc.conf.5 Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man5/rc.conf.5 ============================================================================== --- stable/10/share/man/man5/rc.conf.5 Thu Mar 30 06:07:36 2017 (r316248) +++ stable/10/share/man/man5/rc.conf.5 Thu Mar 30 06:07:38 2017 (r316249) @@ -182,7 +182,7 @@ Enabling this option is likely to increa services are enabled that utilize the force_depend check. .It Ao Ar name Ac Ns Va _chroot .Pq Vt str -.Xr chroot +.Xr chroot 8 to this directory before running the service. .It Ao Ar name Ac Ns Va _user .Pq Vt str From owner-svn-src-stable-10@freebsd.org Thu Mar 30 06:13:55 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9E0DAD25438; Thu, 30 Mar 2017 06:13:55 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 50B56C49; Thu, 30 Mar 2017 06:13:55 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2U6DsGu007213; Thu, 30 Mar 2017 06:13:54 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2U6DsOr007211; Thu, 30 Mar 2017 06:13:54 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201703300613.v2U6DsOr007211@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 30 Mar 2017 06:13:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r316253 - in stable/10/usr.sbin: ctladm ctld X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Mar 2017 06:13:55 -0000 Author: ngie Date: Thu Mar 30 06:13:54 2017 New Revision: 316253 URL: https://svnweb.freebsd.org/changeset/base/316253 Log: MFC r316050,r316051: r316050: ctld: sort #includes per style(9) - Only include sys/types.h or sys/param.h, not both. - Sort alphabetically. r316051: ctldadm: sort #includes per style(9) - Only include sys/types.h or sys/param.h, not both. - Sort alphabetically. Modified: stable/10/usr.sbin/ctladm/ctladm.c stable/10/usr.sbin/ctld/kernel.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/ctladm/ctladm.c ============================================================================== --- stable/10/usr.sbin/ctladm/ctladm.c Thu Mar 30 06:13:39 2017 (r316252) +++ stable/10/usr.sbin/ctladm/ctladm.c Thu Mar 30 06:13:54 2017 (r316253) @@ -43,25 +43,24 @@ #include __FBSDID("$FreeBSD$"); -#include -#include -#include #include +#include +#include #include #include -#include #include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include +#include +#include +#include #include -#include -#include -#include -#include +#include #include #include #include Modified: stable/10/usr.sbin/ctld/kernel.c ============================================================================== --- stable/10/usr.sbin/ctld/kernel.c Thu Mar 30 06:13:39 2017 (r316252) +++ stable/10/usr.sbin/ctld/kernel.c Thu Mar 30 06:13:54 2017 (r316253) @@ -37,15 +37,14 @@ #include __FBSDID("$FreeBSD$"); -#include -#include -#include #include +#include +#include +#include #include #include -#include #include -#include +#include #include #include #include From owner-svn-src-stable-10@freebsd.org Thu Mar 30 06:14:37 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DA59FD25505; Thu, 30 Mar 2017 06:14:37 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A71E4D81; Thu, 30 Mar 2017 06:14:37 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2U6EabT007365; Thu, 30 Mar 2017 06:14:36 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2U6Ea3E007364; Thu, 30 Mar 2017 06:14:36 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201703300614.v2U6Ea3E007364@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 30 Mar 2017 06:14:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r316255 - stable/10/share/man/man9 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Mar 2017 06:14:38 -0000 Author: ngie Date: Thu Mar 30 06:14:36 2017 New Revision: 316255 URL: https://svnweb.freebsd.org/changeset/base/316255 Log: MFC r315798: DB_COMMAND(9): fix mandoc markup Start new sentences on new lines. Modified: stable/10/share/man/man9/DB_COMMAND.9 Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man9/DB_COMMAND.9 ============================================================================== --- stable/10/share/man/man9/DB_COMMAND.9 Thu Mar 30 06:14:32 2017 (r316254) +++ stable/10/share/man/man9/DB_COMMAND.9 Thu Mar 30 06:14:36 2017 (r316255) @@ -81,7 +81,9 @@ The number of quad words starting at off .Fa addr that the command must process. .It Fa modif -A pointer to the string of modifiers. That is, a series of symbols used to pass some options to the command. For example, the +A pointer to the string of modifiers. +That is, a series of symbols used to pass some options to the command. +For example, the .Sy examine command will display words in decimal form if it is passed the modifier "d". .El From owner-svn-src-stable-10@freebsd.org Thu Mar 30 06:21:01 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7746ED256BC; Thu, 30 Mar 2017 06:21:01 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3BD4337B; Thu, 30 Mar 2017 06:21:01 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2U6L0Lo008580; Thu, 30 Mar 2017 06:21:00 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2U6Kx5I008563; Thu, 30 Mar 2017 06:20:59 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201703300620.v2U6Kx5I008563@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 30 Mar 2017 06:20:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r316257 - in stable/10: . usr.bin/col/tests usr.sbin/pw/tests X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Mar 2017 06:21:01 -0000 Author: ngie Date: Thu Mar 30 06:20:58 2017 New Revision: 316257 URL: https://svnweb.freebsd.org/changeset/base/316257 Log: MFC r315776: Rename tests from to _test to match the FreeBSD test suite naming scheme usr.bin/diff/diff_test was renamed to usr.bin/diff/netbsd_diff_test to avoid collisions with the renamed FreeBSD test. Added: stable/10/usr.bin/col/tests/col_test.sh - copied unchanged from r315776, head/usr.bin/col/tests/col_test.sh stable/10/usr.sbin/pw/tests/pw_config_test.sh - copied unchanged from r315776, head/usr.sbin/pw/tests/pw_config_test.sh stable/10/usr.sbin/pw/tests/pw_etcdir_test.sh - copied unchanged from r315776, head/usr.sbin/pw/tests/pw_etcdir_test.sh stable/10/usr.sbin/pw/tests/pw_groupadd_test.sh - copied unchanged from r315776, head/usr.sbin/pw/tests/pw_groupadd_test.sh stable/10/usr.sbin/pw/tests/pw_groupdel_test.sh - copied unchanged from r315776, head/usr.sbin/pw/tests/pw_groupdel_test.sh stable/10/usr.sbin/pw/tests/pw_groupmod_test.sh - copied unchanged from r315776, head/usr.sbin/pw/tests/pw_groupmod_test.sh stable/10/usr.sbin/pw/tests/pw_lock_test.sh - copied unchanged from r315776, head/usr.sbin/pw/tests/pw_lock_test.sh stable/10/usr.sbin/pw/tests/pw_useradd_test.sh - copied unchanged from r315776, head/usr.sbin/pw/tests/pw_useradd_test.sh stable/10/usr.sbin/pw/tests/pw_userdel_test.sh - copied unchanged from r315776, head/usr.sbin/pw/tests/pw_userdel_test.sh stable/10/usr.sbin/pw/tests/pw_usermod_test.sh - copied unchanged from r315776, head/usr.sbin/pw/tests/pw_usermod_test.sh stable/10/usr.sbin/pw/tests/pw_usernext_test.sh - copied unchanged from r315776, head/usr.sbin/pw/tests/pw_usernext_test.sh Deleted: stable/10/usr.bin/col/tests/col.sh stable/10/usr.sbin/pw/tests/pw_config.sh stable/10/usr.sbin/pw/tests/pw_etcdir.sh stable/10/usr.sbin/pw/tests/pw_groupadd.sh stable/10/usr.sbin/pw/tests/pw_groupdel.sh stable/10/usr.sbin/pw/tests/pw_groupmod.sh stable/10/usr.sbin/pw/tests/pw_lock.sh stable/10/usr.sbin/pw/tests/pw_useradd.sh stable/10/usr.sbin/pw/tests/pw_userdel.sh stable/10/usr.sbin/pw/tests/pw_usermod.sh stable/10/usr.sbin/pw/tests/pw_usernext.sh Modified: stable/10/ObsoleteFiles.inc stable/10/usr.bin/col/tests/Makefile stable/10/usr.sbin/pw/tests/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/ObsoleteFiles.inc ============================================================================== --- stable/10/ObsoleteFiles.inc Thu Mar 30 06:20:24 2017 (r316256) +++ stable/10/ObsoleteFiles.inc Thu Mar 30 06:20:58 2017 (r316257) @@ -38,6 +38,18 @@ # xargs -n1 | sort | uniq -d; # done +# 20170322: rename to _test to match the FreeBSD test suite name scheme +OLD_FILES+=usr/tests/usr.bin/col/col +OLD_FILES+=usr/tests/usr.sbin/pw/pw_config_test +OLD_FILES+=usr/tests/usr.sbin/pw/pw_etcdir_test +OLD_FILES+=usr/tests/usr.sbin/pw/pw_lock_test +OLD_FILES+=usr/tests/usr.sbin/pw/pw_groupadd_test +OLD_FILES+=usr/tests/usr.sbin/pw/pw_groupdel_test +OLD_FILES+=usr/tests/usr.sbin/pw/pw_groupmod_test +OLD_FILES+=usr/tests/usr.sbin/pw/pw_useradd_test +OLD_FILES+=usr/tests/usr.sbin/pw/pw_userdel_test +OLD_FILES+=usr/tests/usr.sbin/pw/pw_usermod_test +OLD_FILES+=usr/tests/usr.sbin/pw/pw_usernext_test # 20170214: Four files from ggate tests consolidated into one OLD_FILES+=usr/tests/sys/geom/class/gate/1_test OLD_FILES+=usr/tests/sys/geom/class/gate/2_test Modified: stable/10/usr.bin/col/tests/Makefile ============================================================================== --- stable/10/usr.bin/col/tests/Makefile Thu Mar 30 06:20:24 2017 (r316256) +++ stable/10/usr.bin/col/tests/Makefile Thu Mar 30 06:20:58 2017 (r316257) @@ -1,6 +1,6 @@ # $FreeBSD$ -ATF_TESTS_SH= col +ATF_TESTS_SH= col_test FILES= rlf.in \ rlf2.in Copied: stable/10/usr.bin/col/tests/col_test.sh (from r315776, head/usr.bin/col/tests/col_test.sh) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/usr.bin/col/tests/col_test.sh Thu Mar 30 06:20:58 2017 (r316257, copy of r315776, head/usr.bin/col/tests/col_test.sh) @@ -0,0 +1,33 @@ +# $FreeBSD$ + +atf_test_case rlf + +rlf_head() +{ + atf_set "descr" "testing reverse line feed" +} +rlf_body() +{ + atf_check \ + -o inline:"a b\n" \ + -e empty \ + -s exit:0 \ + col < $(atf_get_srcdir)/rlf.in + + atf_check \ + -o inline:"a b\n" \ + -e empty \ + -s exit:0 \ + col < $(atf_get_srcdir)/rlf2.in + + atf_check \ + -o inline:"a b\n" \ + -e empty \ + -s exit:0 \ + col -x < $(atf_get_srcdir)/rlf2.in +} + +atf_init_test_cases() +{ + atf_add_test_case rlf +} Modified: stable/10/usr.sbin/pw/tests/Makefile ============================================================================== --- stable/10/usr.sbin/pw/tests/Makefile Thu Mar 30 06:20:24 2017 (r316256) +++ stable/10/usr.sbin/pw/tests/Makefile Thu Mar 30 06:20:58 2017 (r316257) @@ -5,16 +5,16 @@ BINDIR= ${TESTSDIR} PROGS+= crypt LDADD+= -lcrypt -ATF_TESTS_SH= pw_etcdir \ - pw_lock \ - pw_config \ - pw_groupadd \ - pw_groupdel \ - pw_groupmod \ - pw_useradd \ - pw_userdel \ - pw_usermod \ - pw_usernext +ATF_TESTS_SH= pw_etcdir_test \ + pw_lock_test \ + pw_config_test \ + pw_groupadd_test \ + pw_groupdel_test \ + pw_groupmod_test \ + pw_useradd_test \ + pw_userdel_test \ + pw_usermod_test \ + pw_usernext_test .for tp in ${ATF_TESTS_SH} TEST_METADATA.${tp}+= required_user="root" Copied: stable/10/usr.sbin/pw/tests/pw_config_test.sh (from r315776, head/usr.sbin/pw/tests/pw_config_test.sh) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/usr.sbin/pw/tests/pw_config_test.sh Thu Mar 30 06:20:58 2017 (r316257, copy of r315776, head/usr.sbin/pw/tests/pw_config_test.sh) @@ -0,0 +1,26 @@ +# $FreeBSD$ + +# Import helper functions +. $(atf_get_srcdir)/helper_functions.shin + +atf_test_case generate_config +generate_config_body() { + atf_check -s exit:0 \ + ${PW} useradd -D -C ${HOME}/foo.conf + atf_check -o file:$(atf_get_srcdir)/pw.conf \ + cat ${HOME}/foo.conf +} + +atf_test_case modify_config_uid_gid_boundaries +modify_config_uid_gid_boundaries_body() { + atf_check -s exit:0 \ + ${PW} useradd -D -C ${HOME}/foo.conf \ + -u 2000,5000 -i 2100,6000 + atf_check -o file:$(atf_get_srcdir)/pw-modified.conf \ + cat ${HOME}/foo.conf +} + +atf_init_test_cases() { + atf_add_test_case generate_config + atf_add_test_case modify_config_uid_gid_boundaries +} Copied: stable/10/usr.sbin/pw/tests/pw_etcdir_test.sh (from r315776, head/usr.sbin/pw/tests/pw_etcdir_test.sh) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/usr.sbin/pw/tests/pw_etcdir_test.sh Thu Mar 30 06:20:58 2017 (r316257, copy of r315776, head/usr.sbin/pw/tests/pw_etcdir_test.sh) @@ -0,0 +1,18 @@ +# $FreeBSD$ + +# When the '-V directory' option is provided, the directory must exist +atf_test_case etcdir_must_exist +etcdir_must_exist_head() { + atf_set "descr" "When the '-V directory' option is provided, the directory must exist" +} + +etcdir_must_exist_body() { + local fakedir="/this_directory_does_not_exist" + atf_check -e inline:"pw: no such directory \`$fakedir'\n" \ + -s exit:72 -x pw -V ${fakedir} usershow root +} + +atf_init_test_cases() { + atf_add_test_case etcdir_must_exist +} + Copied: stable/10/usr.sbin/pw/tests/pw_groupadd_test.sh (from r315776, head/usr.sbin/pw/tests/pw_groupadd_test.sh) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/usr.sbin/pw/tests/pw_groupadd_test.sh Thu Mar 30 06:20:58 2017 (r316257, copy of r315776, head/usr.sbin/pw/tests/pw_groupadd_test.sh) @@ -0,0 +1,26 @@ +# $FreeBSD$ + +# Import helper functions +. $(atf_get_srcdir)/helper_functions.shin + +atf_test_case group_add_gid_too_large +group_add_gid_too_large_body() { + populate_etc_skel + atf_check -s exit:64 -e inline:"pw: Bad id '9999999999999': too large\n" \ + ${PW} groupadd -n test1 -g 9999999999999 +} + +atf_test_case group_add_already_exists +group_add_already_exists_body() { + populate_etc_skel + + atf_check -s exit:0 ${PW} groupadd foo + atf_check -s exit:65 \ + -e inline:"pw: group name \`foo' already exists\n" \ + ${PW} groupadd foo +} + +atf_init_test_cases() { + atf_add_test_case group_add_gid_too_large + atf_add_test_case group_add_already_exists +} Copied: stable/10/usr.sbin/pw/tests/pw_groupdel_test.sh (from r315776, head/usr.sbin/pw/tests/pw_groupdel_test.sh) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/usr.sbin/pw/tests/pw_groupdel_test.sh Thu Mar 30 06:20:58 2017 (r316257, copy of r315776, head/usr.sbin/pw/tests/pw_groupdel_test.sh) @@ -0,0 +1,24 @@ +# $FreeBSD$ + +# Import helper functions +. $(atf_get_srcdir)/helper_functions.shin + + +# Test to make sure we do not accidentially delete wheel when trying to delete +# an unknown group +atf_test_case group_do_not_delete_wheel_if_group_unknown +group_do_not_delete_wheel_if_group_unknown_head() { + atf_set "descr" "Make sure we do not consider gid 0 an unknown group" +} +group_do_not_delete_wheel_if_group_unknown_body() { + populate_etc_skel + atf_check -s exit:0 -o inline:"wheel:*:0:root\n" -x ${PW} groupshow wheel + atf_check -e inline:"pw: Bad id 'I_do_not_exist': invalid\n" -s exit:64 -x \ + ${PW} groupdel -g I_do_not_exist + atf_check -s exit:0 -o inline:"wheel:*:0:root\n" -x ${PW} groupshow wheel +} + + +atf_init_test_cases() { + atf_add_test_case group_do_not_delete_wheel_if_group_unknown +} Copied: stable/10/usr.sbin/pw/tests/pw_groupmod_test.sh (from r315776, head/usr.sbin/pw/tests/pw_groupmod_test.sh) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/usr.sbin/pw/tests/pw_groupmod_test.sh Thu Mar 30 06:20:58 2017 (r316257, copy of r315776, head/usr.sbin/pw/tests/pw_groupmod_test.sh) @@ -0,0 +1,118 @@ +# $FreeBSD$ + +# Import helper functions +. $(atf_get_srcdir)/helper_functions.shin + + +# Test adding & removing a user from a group +atf_test_case groupmod_user +groupmod_user_body() { + populate_etc_skel + atf_check -s exit:0 ${PW} addgroup test + atf_check -s exit:0 ${PW} groupmod test -m root + atf_check -s exit:0 -o match:"^test:\*:1001:root$" \ + grep "^test:\*:.*:root$" $HOME/group + atf_check -s exit:0 ${PW} groupmod test -d root + atf_check -s exit:0 -o match:"^test:\*:1001:$" \ + grep "^test:\*:.*:$" $HOME/group +} + + +# Test adding and removing a user that does not exist +atf_test_case groupmod_invalid_user +groupmod_invalid_user_body() { + populate_etc_skel + atf_check -s exit:0 ${PW} addgroup test + atf_check -s exit:67 -e match:"does not exist" ${PW} groupmod test -m foo + atf_check -s exit:0 ${PW} groupmod test -d foo +} + +atf_test_case groupmod_bug_193704 +groupmod_bug_193704_head() { + atf_set "descr" "Regression test for the #193704 bug" +} +groupmod_bug_193704_body() { + populate_etc_skel + atf_check -s exit:0 -x ${PW} groupadd test + atf_check -s exit:0 -x ${PW} groupmod test -l newgroupname + atf_check -s exit:65 -e match:"^pw: unknown group" -x ${PW} groupshow test +} + +atf_test_case usermod_bug_185666 +usermod_bug_185666_head() { + atf_set "descr" "Regression test for the #185666 bug" +} + +usermod_bug_185666_body() { + populate_etc_skel + atf_check -s exit:0 -x ${PW} useradd testuser + atf_check -s exit:0 -x ${PW} groupadd testgroup + atf_check -s exit:0 -x ${PW} groupadd testgroup2 + atf_check -s exit:0 -x ${PW} usermod testuser -G testgroup + atf_check -o inline:"testuser:*:1001:\n" -x ${PW} groupshow testuser + atf_check -o inline:"testgroup:*:1002:testuser\n" -x ${PW} groupshow testgroup + atf_check -o inline:"testgroup2:*:1003:\n" -x ${PW} groupshow testgroup2 + atf_check -s exit:0 -x ${PW} usermod testuser -G testgroup2 + atf_check -o inline:"testuser:*:1001:\n" -x ${PW} groupshow testuser + atf_check -o inline:"testgroup:*:1002:\n" -x ${PW} groupshow testgroup + atf_check -o inline:"testgroup2:*:1003:testuser\n" -x ${PW} groupshow testgroup2 +} + +atf_test_case do_not_duplicate_group_on_gid_change +do_not_duplicate_group_on_gid_change_head() { + atf_set "descr" "Do not duplicate group on gid change" +} + +do_not_duplicate_group_on_gid_change_body() { + populate_etc_skel + atf_check -s exit:0 -x ${PW} groupadd testgroup + atf_check -s exit:0 -x ${PW} groupmod testgroup -g 12345 + # use grep to see if the entry has not be duplicated + atf_check -o inline:"testgroup:*:12345:\n" -s exit:0 -x grep "^testgroup" ${HOME}/group +} + +atf_test_case groupmod_rename +groupmod_rename_body() { + populate_etc_skel + + atf_check -s exit:0 ${PW} groupadd foo + atf_check -s exit:0 ${PW} groupmod foo -l bar + atf_check -s exit:0 -o match:"^bar:.*" \ + grep "^bar:.*" ${HOME}/group +} + +atf_test_case groupmod_members +groupmod_members_body() { + populate_etc_skel + + for i in user1 user2 user3 user4; do + atf_check -s exit:0 ${PW} useradd $i + done + + atf_check -s exit:0 ${PW} groupadd foo -M "user1, user2" + atf_check -o inline:"foo:*:1005:user1,user2\n" -s exit:0 \ + ${PW} groupshow foo + atf_check -s exit:0 ${PW} groupmod foo -m "user3, user4" + atf_check -o inline:"foo:*:1005:user1,user2,user3,user4\n" -s exit:0 \ + ${PW} groupshow foo + atf_check -s exit:0 ${PW} groupmod foo -M "user1, user4" + atf_check -o inline:"foo:*:1005:user1,user4\n" -s exit:0 \ + ${PW} groupshow foo + # what about duplicates + atf_check -s exit:0 ${PW} groupmod foo -m "user1, user2, user3, user4" + atf_check -o inline:"foo:*:1005:user1,user4,user2,user3\n" -s exit:0 \ + ${PW} groupshow foo + atf_check -s exit:0 ${PW} groupmod foo -d "user1, user3" + atf_check -o inline:"foo:*:1005:user4,user2\n" -s exit:0 \ + ${PW} groupshow foo +} + +atf_init_test_cases() { + atf_add_test_case groupmod_user + atf_add_test_case groupmod_invalid_user + atf_add_test_case groupmod_bug_193704 + atf_add_test_case usermod_bug_185666 + atf_add_test_case do_not_duplicate_group_on_gid_change + atf_add_test_case groupmod_rename + atf_add_test_case groupmod_members +} Copied: stable/10/usr.sbin/pw/tests/pw_lock_test.sh (from r315776, head/usr.sbin/pw/tests/pw_lock_test.sh) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/usr.sbin/pw/tests/pw_lock_test.sh Thu Mar 30 06:20:58 2017 (r316257, copy of r315776, head/usr.sbin/pw/tests/pw_lock_test.sh) @@ -0,0 +1,42 @@ +# $FreeBSD$ + +# Import helper functions +. $(atf_get_srcdir)/helper_functions.shin + +# Test locking and unlocking a user account +atf_test_case user_locking cleanup +user_locking_body() { + populate_etc_skel + ${PW} useradd test || atf_fail "Creating test user" + ${PW} lock test || atf_fail "Locking the user" + atf_check -s exit:0 -o match:"^test:\*LOCKED\*\*:1001:" \ + grep "^test:\*LOCKED\*\*:1001:" $HOME/master.passwd + ${PW} unlock test || atf_fail "Locking the user" + atf_check -s exit:0 -o match:"^test:\*:1001:" \ + grep "^test:\*:1001:" $HOME/master.passwd +} + +atf_test_case numeric_locking cleanup +numeric_locking_body() { + populate_etc_skel + ${PW} useradd test || atf_fail "Creating test user" + ${PW} lock 1001 || atf_fail "Locking the user" + atf_check -s exit:0 -o match:"^test:\*LOCKED\*\*:1001:" \ + grep "^test:\*LOCKED\*\*:1001:" $HOME/master.passwd + ${PW} unlock 1001 || atf_fail "Unlocking the user" + atf_check -s exit:0 -o match:"^test:\*:1001:" \ + grep "^test:\*:1001:" $HOME/master.passwd + # Now numeric names + ${PW} useradd -n 1001 || atf_fail "Creating test user" + ${PW} lock 1001 || atf_fail "Locking the user" + atf_check -s exit:0 -o match:"^1001:\*LOCKED\*\*:1002:" \ + grep "^1001:\*LOCKED\*\*:1002:" $HOME/master.passwd + ${PW} unlock 1001 || atf_fail "Unlocking the user" + atf_check -s exit:0 -o match:"^1001:\*:1002:" \ + grep "^1001:\*:1002:" $HOME/master.passwd +} + +atf_init_test_cases() { + atf_add_test_case user_locking + atf_add_test_case numeric_locking +} Copied: stable/10/usr.sbin/pw/tests/pw_useradd_test.sh (from r315776, head/usr.sbin/pw/tests/pw_useradd_test.sh) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/usr.sbin/pw/tests/pw_useradd_test.sh Thu Mar 30 06:20:58 2017 (r316257, copy of r315776, head/usr.sbin/pw/tests/pw_useradd_test.sh) @@ -0,0 +1,422 @@ +# $FreeBSD$ + +# Import helper functions +. $(atf_get_srcdir)/helper_functions.shin + +# Test add user +atf_test_case user_add +user_add_body() { + populate_etc_skel + + atf_check -s exit:0 ${PW} useradd test + atf_check -s exit:0 -o match:"^test:.*" \ + grep "^test:.*" $HOME/master.passwd +} + +# Test add user with option -N +atf_test_case user_add_noupdate +user_add_noupdate_body() { + populate_etc_skel + + atf_check -s exit:0 -o match:"^test:.*" ${PW} useradd test -N + atf_check -s exit:1 -o empty grep "^test:.*" $HOME/master.passwd +} + +# Test add user with comments +atf_test_case user_add_comments +user_add_comments_body() { + populate_etc_skel + + atf_check -s exit:0 ${PW} useradd test -c "Test User,work,123,456" + atf_check -s exit:0 -o match:"^test:.*:Test User,work,123,456:" \ + grep "^test:.*:Test User,work,123,456:" $HOME/master.passwd +} + +# Test add user with comments and option -N +atf_test_case user_add_comments_noupdate +user_add_comments_noupdate_body() { + populate_etc_skel + + atf_check -s exit:0 -o match:"^test:.*:Test User,work,123,456:" \ + ${PW} useradd test -c "Test User,work,123,456" -N + atf_check -s exit:1 -o empty grep "^test:.*" $HOME/master.passwd +} + +# Test add user with invalid comments +atf_test_case user_add_comments_invalid +user_add_comments_invalid_body() { + populate_etc_skel + + atf_check -s exit:65 -e match:"invalid character" \ + ${PW} useradd test -c "Test User,work,123:456,456" + atf_check -s exit:1 -o empty \ + grep "^test:.*:Test User,work,123:456,456:" $HOME/master.passwd +} + +# Test add user with invalid comments and option -N +atf_test_case user_add_comments_invalid_noupdate +user_add_comments_invalid_noupdate_body() { + populate_etc_skel + + atf_check -s exit:65 -e match:"invalid character" \ + ${PW} useradd test -c "Test User,work,123:456,456" -N + atf_check -s exit:1 -o empty grep "^test:.*" $HOME/master.passwd +} + +# Test add user with alternate homedir +atf_test_case user_add_homedir +user_add_homedir_body() { + populate_etc_skel + + atf_check -s exit:0 ${PW} useradd test -d /foo/bar + atf_check -s exit:0 -o match:"^test:\*:.*::0:0:User &:/foo/bar:.*" \ + ${PW} usershow test +} + +# Test add user with account expiration as an epoch date +atf_test_case user_add_account_expiration_epoch +user_add_account_expiration_epoch_body() { + populate_etc_skel + + DATE=`date -j -v+1d "+%s"` + atf_check -s exit:0 ${PW} useradd test -e ${DATE} + atf_check -s exit:0 -o match:"^test:\*:.*::0:${DATE}:.*" \ + ${PW} usershow test +} + +# Test add user with account expiration as a DD-MM-YYYY date +atf_test_case user_add_account_expiration_date_numeric +user_add_account_expiration_date_numeric_body() { + populate_etc_skel + + DATE=`date -j -v+1d "+%d-%m-%Y"` + EPOCH=`date -j -f "%d-%m-%Y %H:%M:%S" "${DATE} 00:00:00" "+%s"` + atf_check -s exit:0 ${PW} useradd test -e ${DATE} + atf_check -s exit:0 -o match:"^test:\*:.*::0:${EPOCH}:User &:.*" \ + ${PW} usershow test +} + +# Test add user with account expiration as a DD-MM-YYYY date +atf_test_case user_add_account_expiration_date_month +user_add_account_expiration_date_month_body() { + populate_etc_skel + + DATE=`date -j -v+1d "+%d-%b-%Y"` + EPOCH=`date -j -f "%d-%b-%Y %H:%M:%S" "${DATE} 00:00:00" "+%s"` + atf_check -s exit:0 ${PW} useradd test -e ${DATE} + atf_check -s exit:0 -o match:"^test:\*:.*::0:${EPOCH}:User &:.*" \ + ${PW} usershow test +} + +# Test add user with account expiration as a relative date +atf_test_case user_add_account_expiration_date_relative +user_add_account_expiration_date_relative_body() { + populate_etc_skel + + EPOCH=`date -j -v+13m "+%s"` + BUF=`expr $EPOCH + 5` + atf_check -s exit:0 ${PW} useradd test -e +13o + TIME=`${PW} usershow test | awk -F ':' '{print $7}'` + [ ! -z $TIME -a $TIME -ge $EPOCH -a $TIME -lt $BUF ] || \ + atf_fail "Expiration time($TIME) was not within $EPOCH - $BUF seconds." +} + +# Test add user with password expiration as an epoch date +atf_test_case user_add_password_expiration_epoch +user_add_password_expiration_epoch_body() { + populate_etc_skel + + DATE=`date -j -v+1d "+%s"` + atf_check -s exit:0 ${PW} useradd test -p ${DATE} + atf_check -s exit:0 -o match:"^test:\*:.*::${DATE}:0:.*" \ + ${PW} usershow test +} + +# Test add user with password expiration as a DD-MM-YYYY date +atf_test_case user_add_password_expiration_date_numeric +user_add_password_expiration_date_numeric_body() { + populate_etc_skel + + DATE=`date -j -v+1d "+%d-%m-%Y"` + EPOCH=`date -j -f "%d-%m-%Y %H:%M:%S" "${DATE} 00:00:00" "+%s"` + atf_check -s exit:0 ${PW} useradd test -p ${DATE} + atf_check -s exit:0 -o match:"^test:\*:.*::${EPOCH}:0:User &:.*" \ + ${PW} usershow test +} + +# Test add user with password expiration as a DD-MMM-YYYY date +atf_test_case user_add_password_expiration_date_month +user_add_password_expiration_date_month_body() { + populate_etc_skel + + DATE=`date -j -v+1d "+%d-%b-%Y"` + EPOCH=`date -j -f "%d-%b-%Y %H:%M:%S" "${DATE} 00:00:00" "+%s"` + atf_check -s exit:0 ${PW} useradd test -p ${DATE} + atf_check -s exit:0 -o match:"^test:\*:.*::${EPOCH}:0:User &:.*" \ + ${PW} usershow test +} + +# Test add user with password expiration as a relative date +atf_test_case user_add_password_expiration_date_relative +user_add_password_expiration_date_relative_body() { + populate_etc_skel + + EPOCH=`date -j -v+13m "+%s"` + BUF=`expr $EPOCH + 5` + atf_check -s exit:0 ${PW} useradd test -p +13o + TIME=`${PW} usershow test | awk -F ':' '{print $6}'` + [ ! -z $TIME -a $TIME -ge $EPOCH -a $TIME -lt $BUF ] || \ + atf_fail "Expiration time($TIME) was not within $EPOCH - $BUF seconds." +} + +atf_test_case user_add_name_too_long +user_add_name_too_long_body() { + populate_etc_skel + atf_check -e match:"too long" -s exit:64 \ + ${PW} useradd name_very_vert_very_very_very_long +} + +atf_test_case user_add_expiration +user_add_expiration_body() { + populate_etc_skel + + atf_check -s exit:0 \ + ${PW} useradd foo -e 20-03-2037 + atf_check -o inline:"foo:*:1001:1001::0:2121120000:User &:/home/foo:/bin/sh\n" \ + -s exit:0 grep "^foo" ${HOME}/master.passwd + atf_check -s exit:0 ${PW} userdel foo + atf_check -s exit:0 \ + ${PW} useradd foo -e 20-03-37 + atf_check -o inline:"foo:*:1001:1001::0:2121120000:User &:/home/foo:/bin/sh\n" \ + -s exit:0 grep "^foo" ${HOME}/master.passwd + atf_check -s exit:0 ${PW} userdel foo + atf_check -s exit:0 \ + ${PW} useradd foo -e 20-Mar-2037 + atf_check -o inline:"foo:*:1001:1001::0:2121120000:User &:/home/foo:/bin/sh\n" \ + -s exit:0 grep "^foo" ${HOME}/master.passwd + atf_check -s exit:0 ${PW} userdel foo + atf_check -e inline:"pw: Invalid date\n" -s exit:1 \ + ${PW} useradd foo -e 20-Foo-2037 + atf_check -e inline:"pw: Invalid date\n" -s exit:1 \ + ${PW} useradd foo -e 20-13-2037 + atf_check -s exit:0 ${PW} useradd foo -e "12:00 20-03-2037" + atf_check -s exit:0 ${PW} userdel foo + atf_check -e inline:"pw: Invalid date\n" -s exit:1 \ + ${PW} useradd foo -e "12 20-03-2037" + atf_check -s exit:0 ${PW} useradd foo -e "20-03-2037 12:00" + atf_check -s exit:0 ${PW} userdel foo +} + +atf_test_case user_add_invalid_user_entry +user_add_invalid_user_entry_body() { + touch ${HOME}/master.passwd + touch ${HOME}/group + + pwd_mkdb -p -d ${HOME} ${HOME}/master.passwd || \ + atf_fail "generate passwd from master.passwd" + atf_check -s exit:0 ${PW} useradd foo + echo "foo1:*:1002" >> ${HOME}/master.passwd + atf_check -s exit:1 -e match:"Invalid user entry" ${PW} useradd foo2 +} + +atf_test_case user_add_invalid_group_entry +user_add_invalid_group_entry_body() { + touch ${HOME}/master.passwd + touch ${HOME}/group + + pwd_mkdb -p -d ${HOME} ${HOME}/master.passwd || \ + atf_fail "generate passwd from master.passwd" + atf_check -s exit:0 ${PW} useradd foo + echo 'foo1:*:1002' >> group + atf_check -s exit:1 -e match:"Invalid group entry" ${PW} useradd foo2 +} + +atf_test_case user_add_password_from_h +user_add_password_from_h_body() { + populate_etc_skel + + atf_check -s exit:0 ${PW} useradd foo -h 0 <<-EOF + $(echo mypassword) + EOF + passhash=`awk -F ':' '/^foo:/ {print $2}' $HOME/master.passwd` + atf_check -s exit:0 -o inline:$passhash \ + $(atf_get_srcdir)/crypt $passhash "mypassword" +} + +atf_test_case user_add_R +user_add_R_body() { + populate_root_etc_skel + + atf_check -s exit:0 ${RPW} useradd foo + atf_check -s exit:0 ${RPW} useradd bar -m + test -d ${HOME}/home || atf_fail "Home parent directory not created" + test -d ${HOME}/home/bar || atf_fail "Directory not created" + atf_check -s exit:0 ${RPW} userdel bar + test -d ${HOME}/home/bar || atf_fail "Directory removed" + atf_check -s exit:0 ${RPW} useradd bar + atf_check -s exit:0 ${RPW} userdel bar -r + [ ! -d ${HOME}/home/bar ] || atf_fail "Directory not removed" +} + +atf_test_case user_add_R_symlink +user_add_R_symlink_body() { + populate_root_etc_skel + + mkdir ${HOME}/usr + atf_check -s exit:0 ${RPW} useradd foo -m + test -d ${HOME}/usr/home || atf_fail "Home parent directory not created" + test -h ${HOME}/home || atf_fail "/home directory is not a symlink" + atf_check -s exit:0 -o inline:"usr/home\n" readlink ${HOME}/home +} + +atf_test_case user_add_skel +user_add_skel_body() { + populate_root_etc_skel + + mkdir ${HOME}/skel + echo "a" > ${HOME}/skel/.a + echo "b" > ${HOME}/skel/b + mkdir ${HOME}/skel/c + mkdir ${HOME}/skel/c/d + mkdir ${HOME}/skel/dot.plop + echo "c" > ${HOME}/skel/c/d/dot.c + mkdir ${HOME}/home + ln -sf /nonexistent ${HOME}/skel/c/foo + atf_check -s exit:0 ${RPW} useradd foo -k /skel -m + test -d ${HOME}/home/foo || atf_fail "Directory not created" + test -f ${HOME}/home/foo/.a || atf_fail "File not created" + atf_check -o file:${HOME}/skel/.a -s exit:0 cat ${HOME}/home/foo/.a + atf_check -o file:${HOME}/skel/b -s exit:0 cat ${HOME}/home/foo/b + test -d ${HOME}/home/foo/c || atf_fail "Dotted directory in skel not copied" + test -d ${HOME}/home/foo/.plop || atf_fail "Directory in skell not created" + atf_check -o inline:"/nonexistent\n" -s ignore readlink -f ${HOME}/home/foo/c/foo + atf_check -o file:${HOME}/skel/c/d/dot.c -s exit:0 cat ${HOME}/home/foo/c/d/.c +} + +atf_test_case user_add_uid0 +user_add_uid0_body() { + populate_etc_skel + atf_check -e inline:"pw: WARNING: new account \`foo' has a uid of 0 (superuser access!)\n" \ + -s exit:0 ${PW} useradd foo -u 0 -g 0 -d /root -s /bin/sh -c "Bourne-again Superuser" -o + atf_check \ + -o inline:"foo:*:0:0::0:0:Bourne-again Superuser:/root:/bin/sh\n" \ + -s exit:0 ${PW} usershow foo +} + +atf_test_case user_add_uid_too_large +user_add_uid_too_large_body() { + populate_etc_skel + atf_check -s exit:64 -e inline:"pw: Bad id '9999999999999': too large\n" \ + ${PW} useradd -n test1 -u 9999999999999 +} + +atf_test_case user_add_bad_shell +user_add_bad_shell_body() { + populate_etc_skel + + atf_check -s exit:0 ${PW} useradd foo -s sh + atf_check -s exit:78 -e ignore ${PW} useradd bar -s badshell +} + +atf_test_case user_add_already_exists +user_add_already_exists_body() { + populate_etc_skel + + atf_check -s exit:0 ${PW} useradd foo + atf_check -s exit:65 \ + -e inline:"pw: login name \`foo' already exists\n" \ + ${PW} useradd foo +} + +atf_test_case user_add_w_error +user_add_w_error_body() { + populate_etc_skel + + atf_check -s exit:1 -e match:"pw: Invalid value for default password" \ + ${PW} useradd foo -w invalid_value +} + +atf_test_case user_add_w_no +user_add_w_no_body() { + populate_etc_skel + + atf_check -s exit:0 ${PW} useradd foo -w no + atf_check -s exit:0 -o match:"^foo:\*" grep "^foo:" $HOME/master.passwd +} + +atf_test_case user_add_w_none +user_add_w_none_body() { + populate_etc_skel + + atf_check -s exit:0 ${PW} useradd foo -w none + atf_check -s exit:0 -o match:"^foo::" grep "^foo:" $HOME/master.passwd +} + +atf_test_case user_add_w_random +user_add_w_random_body() { + populate_etc_skel + + password=`${PW} useradd foo -w random | cat` + passhash=`awk -F ':' '/^foo:/ {print $2}' $HOME/master.passwd` + atf_check -s exit:0 -o inline:$passhash \ + $(atf_get_srcdir)/crypt $passhash "$password" +} + +atf_test_case user_add_w_yes +user_add_w_yes_body() { + populate_etc_skel + password=`${PW} useradd foo -w random | cat` + passhash=`awk -F ':' '/^foo:/ {print $2}' $HOME/master.passwd` + atf_check -s exit:0 -o inline:$passhash \ + $(atf_get_srcdir)/crypt $passhash "$password" +} + +atf_test_case user_add_with_pw_conf +user_add_with_pw_conf_body() +{ + populate_etc_skel + atf_check -s exit:0 \ + ${PW} useradd -D -C ${HOME}/pw.conf \ + -u 2000,32767 -i 2000,32767 + atf_check -s exit:0 \ + -o inline:"minuid = 2000\nmaxuid = 32767\nmingid = 2000\nmaxgid = 32767\n" \ + grep "^m.*id =" ${HOME}/pw.conf + atf_check -s exit:0 \ + ${PW} useradd foo -C ${HOME}/pw.conf +} + +atf_init_test_cases() { + atf_add_test_case user_add + atf_add_test_case user_add_noupdate + atf_add_test_case user_add_comments + atf_add_test_case user_add_comments_noupdate + atf_add_test_case user_add_comments_invalid + atf_add_test_case user_add_comments_invalid_noupdate + atf_add_test_case user_add_homedir + atf_add_test_case user_add_account_expiration_epoch + atf_add_test_case user_add_account_expiration_date_numeric + atf_add_test_case user_add_account_expiration_date_month + atf_add_test_case user_add_account_expiration_date_relative + atf_add_test_case user_add_password_expiration_epoch + atf_add_test_case user_add_password_expiration_date_numeric + atf_add_test_case user_add_password_expiration_date_month + atf_add_test_case user_add_password_expiration_date_relative + atf_add_test_case user_add_name_too_long + atf_add_test_case user_add_expiration + atf_add_test_case user_add_invalid_user_entry + atf_add_test_case user_add_invalid_group_entry + atf_add_test_case user_add_password_from_h + atf_add_test_case user_add_R + atf_add_test_case user_add_R_symlink + atf_add_test_case user_add_skel + atf_add_test_case user_add_uid0 + atf_add_test_case user_add_uid_too_large + atf_add_test_case user_add_bad_shell + atf_add_test_case user_add_already_exists + atf_add_test_case user_add_w_error + atf_add_test_case user_add_w_no + atf_add_test_case user_add_w_none + atf_add_test_case user_add_w_random + atf_add_test_case user_add_w_yes + atf_add_test_case user_add_with_pw_conf +} Copied: stable/10/usr.sbin/pw/tests/pw_userdel_test.sh (from r315776, head/usr.sbin/pw/tests/pw_userdel_test.sh) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/usr.sbin/pw/tests/pw_userdel_test.sh Thu Mar 30 06:20:58 2017 (r316257, copy of r315776, head/usr.sbin/pw/tests/pw_userdel_test.sh) @@ -0,0 +1,76 @@ +# $FreeBSD$ + +# Import helper functions +. $(atf_get_srcdir)/helper_functions.shin + + +# Test that a user can be deleted when another user is part of this +# user's default group and does not go into an infinate loop. +# PR: 191427 +atf_test_case rmuser_seperate_group cleanup +rmuser_seperate_group_head() { + atf_set "timeout" "30" +} +rmuser_seperate_group_body() { + populate_etc_skel + ${PW} useradd test || atf_fail "Creating test user" + ${PW} groupmod test -M 'test,root' || \ + atf_fail "Modifying the group" + ${PW} userdel test || atf_fail "Delete the test user" +} + + +atf_test_case user_do_not_try_to_delete_root_if_user_unknown +user_do_not_try_to_delete_root_if_user_unknown_head() { + atf_set "descr" \ + "Make sure not to try to remove root if deleting an unknown user" +} +user_do_not_try_to_delete_root_if_user_unknown_body() { + populate_etc_skel + atf_check -e inline:"pw: Bad id 'plop': invalid\n" -s exit:64 -x \ + ${PW} userdel -u plop +} + +atf_test_case delete_files +delete_files_body() { + populate_root_etc_skel + + mkdir -p ${HOME}/skel + touch ${HOME}/skel/a + mkdir -p ${HOME}/home + mkdir -p ${HOME}/var/mail + echo "foo wedontcare" > ${HOME}/etc/opiekeys + atf_check -s exit:0 ${RPW} useradd foo -k /skel -m + test -d ${HOME}/home || atf_fail "Fail to create home directory" + test -f ${HOME}/var/mail/foo || atf_fail "Mail file not created" + atf_check -s exit:0 ${RPW} userdel foo -r + atf_check -s exit:0 -o inline:"#oo wedontcare\n" cat ${HOME}/etc/opiekeys + if test -f ${HOME}/var/mail/foo; then + atf_fail "Mail file not removed" + fi +} + +atf_test_case delete_numeric_name +delete_numeric_name_body() { + populate_etc_skel + + atf_check ${PW} useradd -n foo -u 4001 + atf_check -e inline:"pw: no such user \`4001'\n" -s exit:67 \ + ${PW} userdel -n 4001 +} + +atf_test_case home_not_a_dir +home_not_a_dir_body() { + populate_root_etc_skel + touch ${HOME}/foo + atf_check ${RPW} useradd foo -d /foo + atf_check ${RPW} userdel foo -r +} + +atf_init_test_cases() { + atf_add_test_case rmuser_seperate_group + atf_add_test_case user_do_not_try_to_delete_root_if_user_unknown + atf_add_test_case delete_files + atf_add_test_case delete_numeric_name + atf_add_test_case home_not_a_dir +} Copied: stable/10/usr.sbin/pw/tests/pw_usermod_test.sh (from r315776, head/usr.sbin/pw/tests/pw_usermod_test.sh) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/usr.sbin/pw/tests/pw_usermod_test.sh Thu Mar 30 06:20:58 2017 (r316257, copy of r315776, head/usr.sbin/pw/tests/pw_usermod_test.sh) @@ -0,0 +1,299 @@ +# $FreeBSD$ + +# Import helper functions +. $(atf_get_srcdir)/helper_functions.shin + +# Test modifying a user +atf_test_case user_mod +user_mod_body() { + populate_etc_skel + + atf_check -s exit:67 -e match:"no such user" ${PW} usermod test + atf_check -s exit:0 ${PW} useradd test + atf_check -s exit:0 ${PW} usermod test + atf_check -s exit:0 -o match:"^test:.*" \ + grep "^test:.*" $HOME/master.passwd +} + +# Test modifying a user with option -N +atf_test_case user_mod_noupdate +user_mod_noupdate_body() { + populate_etc_skel + + atf_check -s exit:67 -e match:"no such user" ${PW} usermod test -N + atf_check -s exit:0 ${PW} useradd test + atf_check -s exit:0 -o match:"^test:.*" ${PW} usermod test -N + atf_check -s exit:0 -o match:"^test:.*" \ + grep "^test:.*" $HOME/master.passwd +} + +# Test modifying a user with comments +atf_test_case user_mod_comments +user_mod_comments_body() { + populate_etc_skel + + atf_check -s exit:0 ${PW} useradd test -c "Test User,home,123,456" + atf_check -s exit:0 ${PW} usermod test -c "Test User,work,123,456" + atf_check -s exit:0 -o match:"^test:.*:Test User,work,123,456:" \ + grep "^test:.*:Test User,work,123,456:" $HOME/master.passwd +} + +# Test modifying a user with comments with option -N +atf_test_case user_mod_comments_noupdate +user_mod_comments_noupdate_body() { + populate_etc_skel + + atf_check -s exit:0 ${PW} useradd test -c "Test User,home,123,456" + atf_check -s exit:0 -o match:"^test:.*:Test User,work,123,456:" \ + ${PW} usermod test -c "Test User,work,123,456" -N + atf_check -s exit:0 -o match:"^test:.*:Test User,home,123,456:" \ + grep "^test:.*:Test User,home,123,456:" $HOME/master.passwd +} + +# Test modifying a user with invalid comments +atf_test_case user_mod_comments_invalid +user_mod_comments_invalid_body() { + populate_etc_skel + + atf_check -s exit:0 ${PW} useradd test + atf_check -s exit:65 -e match:"invalid character" \ + ${PW} usermod test -c "Test User,work,123:456,456" + atf_check -s exit:1 -o empty \ + grep "^test:.*:Test User,work,123:456,456:" $HOME/master.passwd + atf_check -s exit:0 -o match:"^test:\*" \ + grep "^test:\*" $HOME/master.passwd +} + +# Test modifying a user with invalid comments with option -N +atf_test_case user_mod_comments_invalid_noupdate +user_mod_comments_invalid_noupdate_body() { + populate_etc_skel + + atf_check -s exit:0 ${PW} useradd test + atf_check -s exit:65 -e match:"invalid character" \ + ${PW} usermod test -c "Test User,work,123:456,456" -N + atf_check -s exit:1 -o empty \ + grep "^test:.*:Test User,work,123:456,456:" $HOME/master.passwd + atf_check -s exit:0 -o match:"^test:\*" \ + grep "^test:\*" $HOME/master.passwd +} + +# Test modifying a user name with -l +atf_test_case user_mod_name +user_mod_name_body() { + populate_etc_skel + + atf_check -s exit:0 ${PW} useradd foo + atf_check -s exit:0 ${PW} usermod foo -l "bar" + atf_check -s exit:0 -o match:"^bar:.*" \ + grep "^bar:.*" $HOME/master.passwd +} + +# Test modifying a user name with -l with option -N +atf_test_case user_mod_name_noupdate +user_mod_name_noupdate_body() { + populate_etc_skel + + atf_check -s exit:0 ${PW} useradd foo + atf_check -s exit:0 -o match:"^bar:.*" ${PW} usermod foo -l "bar" -N + atf_check -s exit:0 -o match:"^foo:.*" \ + grep "^foo:.*" $HOME/master.passwd +} + +atf_test_case user_mod_rename_multigroups +user_mod_rename_multigroups_body() { + populate_etc_skel + + atf_check -s exit:0 ${PW} groupadd test1 + atf_check -s exit:0 ${PW} groupadd test2 + atf_check -s exit:0 ${PW} useradd foo -G test1,test2 + atf_check -o match:"foo" -s exit:0 ${PW} groupshow test1 + atf_check -o match:"foo" -s exit:0 ${PW} groupshow test2 + atf_check -s exit:0 ${PW} usermod foo -l bar + atf_check -o match:"bar" -s exit:0 ${PW} groupshow test1 + atf_check -o match:"bar" -s exit:0 ${PW} groupshow test2 +} + +atf_test_case user_mod_nogroups +user_mod_nogroups_body() { + populate_etc_skel + + atf_check -s exit:0 ${PW} groupadd test1 + atf_check -s exit:0 ${PW} groupadd test2 + atf_check -s exit:0 ${PW} groupadd test3 + atf_check -s exit:0 ${PW} groupadd test4 + atf_check -s exit:0 ${PW} useradd foo -G test1,test2 *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable-10@freebsd.org Thu Mar 30 08:36:42 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D12CCD23638; Thu, 30 Mar 2017 08:36:42 +0000 (UTC) (envelope-from royger@gmail.com) Received: from mail-vk0-x22e.google.com (mail-vk0-x22e.google.com [IPv6:2607:f8b0:400c:c05::22e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 847CD9C4; Thu, 30 Mar 2017 08:36:42 +0000 (UTC) (envelope-from royger@gmail.com) Received: by mail-vk0-x22e.google.com with SMTP id d188so45829627vka.0; Thu, 30 Mar 2017 01:36:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=L2w4Z05tqqIRgPGvv2T8QItAm+IoxL+YQp09Xea2C38=; b=qESQ6nLj9lpLngMPGxejLqgm95Y91e1SmTXpUhQY/3HGz6j9dw4lMcvhOQ8oEO52Zp 8hdJyfigmw+Z/FddasO/meSs8PiNClNy2XUekQ0CdjorDv03D0ZTmn5yx4KHHQ0tsu1O xJOIiM4/PjZzCXg21JgGlQ+F1t+6AUrlB8dtgQEU5PktVA0epdiFlrVnn51/IE6rMTpL USbFnCbSxn5NwNMZiGbSbSXiTDgaiT/uQPg9dlxASUGsNfDYSIsLpKztg8ehN97BEluF d1fxY3oXQryGbBqbMYXZD4R5eGS2UaTnVxKnYHqezdz/xK0AdOKPQFf1V+5x7o7RkL15 7WSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=L2w4Z05tqqIRgPGvv2T8QItAm+IoxL+YQp09Xea2C38=; b=Y+jxMwIF4NUwOC9XcYqUfXV0NLYthZmQaGtExXOpI9SxD9Zou7bNgakqem7KRa/131 Lr6uzugd+hXL17MmcDxmfdSfT+2kruYshiBNacyIHqlgO4ovMT9pP2Lco5vxw/8L37zj 9R47lUK9vlLgcRn8LrBtSXOSggZSapncJb8cJSyFrh8OjiOLbYnabW5Iq6vhNHINdb0R lZSoiKeCjE5kJiaWTwer+51INMS9rI4OIrNFYtfz+KQ+vnCxtdvCj6hIGxGq32Q8TF8W Jb0yzgoFn6pXLVgnXlXzqvayTiEvUKfT9A3RvkcqUbNWvWEQTmPMcs/fIK+V8waLwnV0 cS9Q== X-Gm-Message-State: AFeK/H39zEpDPHHaVUMoUBrjzoDzfopgpjW0m8V1WzTydQYgSsmIfMs3kZlJIzPJtxnzuw== X-Received: by 10.31.237.2 with SMTP id l2mr2560743vkh.8.1490863001444; Thu, 30 Mar 2017 01:36:41 -0700 (PDT) Received: from localhost (default-46-102-197-194.interdsl.co.uk. [46.102.197.194]) by smtp.gmail.com with ESMTPSA id i55sm402444uaa.26.2017.03.30.01.36.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 30 Mar 2017 01:36:40 -0700 (PDT) Sender: =?UTF-8?Q?Roger_Pau_Monn=C3=A9?= Date: Thu, 30 Mar 2017 09:36:31 +0100 From: Roger Pau =?iso-8859-1?Q?Monn=E9?= To: "Ngie Cooper (yaneurabeya)" Cc: src-committers , svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: Re: svn commit: r316140 - stable/10/sys/dev/xen/netfront Message-ID: <20170330083631.dtututkocx3t24pb@dhcp-3-128.uk.xensource.com> References: <201703291534.v2TFYq2j041847@repo.freebsd.org> <4E2E5DD5-58CB-4847-8E7A-CCF6734E8904@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <4E2E5DD5-58CB-4847-8E7A-CCF6734E8904@gmail.com> User-Agent: NeoMutt/20170306 (1.8.0) X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Mar 2017 08:36:42 -0000 On Wed, Mar 29, 2017 at 10:12:23AM -0700, Ngie Cooper (yaneurabeya) wrote: > > > On Mar 29, 2017, at 08:34, Roger Pau Monné wrote: > > > > Author: royger > > Date: Wed Mar 29 15:34:52 2017 > > New Revision: 316140 > > URL: https://svnweb.freebsd.org/changeset/base/316140 > > > > Log: > > xen/netfront: release resources on removal > > > > Current netfront code doesn't release the resources (grants and mbufs) on > > removal. Add a new helper that releases the resources, so FreeBSD doesn't run > > out of grants or memory when performing heavy hotplug/unplug of Xen PV nic > > devices. > > > > This is a direct commit to stable/10 because the code in newer branches has > > been completely refactored and no longer has this issue. > > > > Reviewed by: royger > > Submitted by: Ouyangzhaowei > > Differential review: https://reviews.freebsd.org/D10088 > > Hi Roger, > This broke GENERIC/i386 with a -Wformat warning, but was fixed in r316170. Sight. It was supposedly "thoroughly tested". Sorry for the breakage and thanks for the fix! Roger. From owner-svn-src-stable-10@freebsd.org Thu Mar 30 08:46:23 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C73FED23918; Thu, 30 Mar 2017 08:46:23 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pg0-x241.google.com (mail-pg0-x241.google.com [IPv6:2607:f8b0:400e:c05::241]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 968C0E; Thu, 30 Mar 2017 08:46:23 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pg0-x241.google.com with SMTP id 79so8413535pgf.0; Thu, 30 Mar 2017 01:46:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=aE/H1a2Pqc+4I2AA7r4uUpHCKmEDu21rzskohsiwDlk=; b=UbayKgzo7OHREJoMn7QnxW9IuJUNFWOQfmacz3g9Wg4mnSwwQhuXmgpATkLeIrzarO lmtVqdTLaAFH5oul/JzUYGuX92dKwvjHuQH3WThxc1BIKFr1VK2elScW6mIR1C5PDC4Y JpX5xDooMz5/AYKntbfLh+PlPF3tMWv3Uc4bBZK7ek/X5I2G8JOgZmTgzFp7QnJkcjr+ TZCWIT7W8ZkNeBLeP1FAtiEnlxaW0FKyIe8gasHdRm88CyTm8djum7Yh4YhO0W/0kZS6 k2Ms14RwaQV6p0+S7Qkh7BArPjE5DCBRd48Vc8scky30vMaIv2PEsIj/cgpnNd/kcIqY 4MXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=aE/H1a2Pqc+4I2AA7r4uUpHCKmEDu21rzskohsiwDlk=; b=cOMVfd6p/ibBjnPhOSQsMeqiZu8wqSh8idlL65ssFIm0mw8nUGSG+h4p0x+xkuF7OK 27ZfqsUX/iq5ShbW2l0y5YXIYEla/2snK7VeFFnyPusffGyNAC9Wy/6C+7lXWx7mGsEb SRVgDxAELneTjSRrVtdxpBvyQxpCgia4B8fn7WUglV+81lQONUwfDgtBd+XWVH3T7XUC OEpon8CUi6eFNsZohFLCCEMPyk+11nxzHBpWOoFJvhz/guOCtnfDzdKbjmOEZ80i2+KN /520VCVzLql7U/UJqWcvk9ZuDkz14S2M4e250zEkIqTo0b0+R8rlDS+gZmDrmNpzWqx2 odLA== X-Gm-Message-State: AFeK/H2FXrqKENJWH8KTw0OCR5Flox4N+lgp5HEnI7990h+hK3NrHoT5F0IZ8aA4RWaUGQ== X-Received: by 10.98.35.9 with SMTP id j9mr4818687pfj.114.1490863583017; Thu, 30 Mar 2017 01:46:23 -0700 (PDT) Received: from pinklady.local (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id j188sm2906782pfg.27.2017.03.30.01.46.21 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 30 Mar 2017 01:46:22 -0700 (PDT) Subject: Re: svn commit: r316140 - stable/10/sys/dev/xen/netfront Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_1D751DCE-B533-4FA3-8A58-66D0B7681450"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: <20170330083631.dtututkocx3t24pb@dhcp-3-128.uk.xensource.com> Date: Thu, 30 Mar 2017 01:46:20 -0700 Cc: src-committers , svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Message-Id: References: <201703291534.v2TFYq2j041847@repo.freebsd.org> <4E2E5DD5-58CB-4847-8E7A-CCF6734E8904@gmail.com> <20170330083631.dtututkocx3t24pb@dhcp-3-128.uk.xensource.com> To: =?utf-8?Q?Roger_Pau_Monn=C3=A9?= X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Mar 2017 08:46:23 -0000 --Apple-Mail=_1D751DCE-B533-4FA3-8A58-66D0B7681450 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=iso-8859-1 > On Mar 30, 2017, at 01:36, Roger Pau Monn=E9 = wrote: >=20 > On Wed, Mar 29, 2017 at 10:12:23AM -0700, Ngie Cooper (yaneurabeya) = wrote: >>=20 >>> On Mar 29, 2017, at 08:34, Roger Pau Monn=E9 = wrote: >>>=20 >>> Author: royger >>> Date: Wed Mar 29 15:34:52 2017 >>> New Revision: 316140 >>> URL: https://svnweb.freebsd.org/changeset/base/316140 >>>=20 >>> Log: >>> xen/netfront: release resources on removal >>>=20 >>> Current netfront code doesn't release the resources (grants and = mbufs) on >>> removal. Add a new helper that releases the resources, so FreeBSD = doesn't run >>> out of grants or memory when performing heavy hotplug/unplug of Xen = PV nic >>> devices. >>>=20 >>> This is a direct commit to stable/10 because the code in newer = branches has >>> been completely refactored and no longer has this issue. >>>=20 >>> Reviewed by: royger >>> Submitted by: Ouyangzhaowei >>> Differential review: https://reviews.freebsd.org/D10088 >>=20 >> Hi Roger, >> This broke GENERIC/i386 with a -Wformat warning, but was fixed = in r316170. >=20 > Sight. It was supposedly "thoroughly tested". Sorry for the breakage = and thanks > for the fix! Np! I just wanted to make sure you were aware of the change, in the = event that it needed to work its way back into the vendor tree. Thanks! -Ngie --Apple-Mail=_1D751DCE-B533-4FA3-8A58-66D0B7681450 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJY3MXdAAoJEPWDqSZpMIYVdnoP+gN+ulx2jrK4GoV8HpihMImf ByKyIk/tvQoQbD5Ki25UiSfzhnowqBR6TLdpAUIsMX7A69mhjNdfGhwDMafn+lbb tjxFKqpET/6cuUeNG7GKTcjrB1xAgEAOrYp4fbGirujnqbFxOiay4LDwlG4tbbaP Pe37CW9LDhVLm7yhJUKF50YQ9qYb8w3YvQp2Zf/rI5FLYIHbSEfXJGMF468wsJMo okdz6wtrnh3xeylewEgmNr9nzDbcLFj9169WhNstl/TWE1P/GnL2sBxrVM+CABkm eMPWi6kDHXj4nYzXb6xU3GTWQI2tlNcJZlFmmjoSlXaEoUOpZeRtfaNpdXiV8Csp db7Ly8uXtzuVqLLFuJIlncQOY91vmztVFdZHQAyfOfa8jdxb1LhQ8BvNFRC6BUeb v5LyGUbUeUsJ6RoyNwDQc8aMqhyO30UfjXWdfLjOJx+56LxknxKZGkBaU/YxBCep BDIY1+53GmDY//vHJmzWPtesYuU8m8X1cg9SV+OGIXRUaZjgP9FyvKGjqsdAoj+e eR+E2uDpT1goePpmpnVaxBvc+8jiPPSHh4WcOeUCtlDvuwbcdcOfk/IWvqhU6PIe 9b3k/d1hHnKlDba94FKkiLd/5kewsjWG/mDzXV0y255x07qOH0E1SnBKdweQotOq jAql6Z0ZGyWamwOhAYqz =gBzZ -----END PGP SIGNATURE----- --Apple-Mail=_1D751DCE-B533-4FA3-8A58-66D0B7681450-- From owner-svn-src-stable-10@freebsd.org Thu Mar 30 12:51:45 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 99538D24058; Thu, 30 Mar 2017 12:51:45 +0000 (UTC) (envelope-from dexuan@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7152DC80; Thu, 30 Mar 2017 12:51:45 +0000 (UTC) (envelope-from dexuan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2UCpijF068410; Thu, 30 Mar 2017 12:51:44 GMT (envelope-from dexuan@FreeBSD.org) Received: (from dexuan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2UCpiO8068400; Thu, 30 Mar 2017 12:51:44 GMT (envelope-from dexuan@FreeBSD.org) Message-Id: <201703301251.v2UCpiO8068400@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dexuan set sender to dexuan@FreeBSD.org using -f From: Dexuan Cui Date: Thu, 30 Mar 2017 12:51:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r316273 - stable/10/sys/boot/efi/loader X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Mar 2017 12:51:45 -0000 Author: dexuan Date: Thu Mar 30 12:51:44 2017 New Revision: 316273 URL: https://svnweb.freebsd.org/changeset/base/316273 Log: MFC: 314547, 314770, 314828, 314891, 314956, 314962, 315235 r314547 loader.efi: reduce the size of the staging area if necessary The loader assumes physical memory in [2MB, 2MB + EFI_STAGING_SIZE) is Conventional Memory, but actually it may not, e.g. in the case of Hyper-V Generation-2 VM (i.e. UEFI VM) running on Windows Server 2012 R2 host, there is a BootServiceData memory block at the address 47.449MB and the memory is not writable. Without the patch, the loader will crash in efi_copy_finish(): see PR 211746. The patch verifies the end of the staging area, and reduces its size if necessary. This way, the loader will not try to write into the BootServiceData memory any longer. Thank Marcel Moolenaar for helping me on this issue! The patch also allocates the staging area in the first 1GB memory. See the comment in the patch for this. Reviewed by: marcel, kib, sephe Approved by: sephe (mentor) Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D9686 r314770 loader.efi: fix recent UEFI-boot regression on physical machines This patch fixes my recent patch "loader.efi: reduce the size of the staging area if necessary", which causes EFI-boot failure on physical machines since Mar 2: on the host there is a 1MB LoaderData memory range, which splits the big Conventional Memory range into a small one (15MB) and a big one: the small one is too small to hold the staging area. We can actually use the LoaderData range safely, because when amd64_tramp -> efi_copy_finish() starts to run, we're almost at the very end of the efi loader code and we're going to "return" to the kernel entry, so we're pretty sure we won't access any loader data any more. For people who are interested in the details: please see https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=211746#c22 PS, some people also reported the regression happened to FreeBSD VM running on Bhyve in EFI mode. This patch should resolve it too, though I don't have such a setup to test. Reviewed by: sephe Approved by: sephe (mentor) Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D9904 r314828 loader.efi: fix an off-by-one bug in efi_verify_staging_size() Also remove the warning message: it may not be unusual to see the memory range containing 2MB is not of EfiConventionalMemory. Sponsored by: Microsoft r314891 loader.efi: finally fix the off-by-one bug in efi_verify_staging_size() r314828(loader.efi: fix an off-by-one bug in efi_verify_staging_size()) doesn't really fix the bug and this patch adds the missing part. It's a shame that I didn't make everything correct at the very beginning... Sponsored by: Microsoft r314956 loader.efi: only reduce the size of the staging area on Hyper-V Doing this on physical hosts turns out to be problematic, e.g. see comment 24 and 28 in https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=211746. To fix the real underlying issue correctly & thoroughly, IMO we need a relocatable kernel, but that would require a lot of complicated long term work: https://reviews.freebsd.org/D9686?id=25414#inline-56969 For now, let's only apply efi_verify_staging_size() to VMs running on Hyper-V, and restore the old behavior on physical machines since that has been working for people for a long period of time, though that's potentially unsafe... Sponsored by: Microsoft r314962 loader.efi: only include the machine/ header files on x86 The 2 files may not exist on other archs like aarch64 and hence we can have a build failure there. Reported by: lwhsu Sponsored by: Microsoft r315235 loader.efi: use stricter check for Hyper-V Some other hypervisors like Xen can pretend to be Hyper-V but obviously they can't implement all Hyper-V features. Let's make sure we're genuine Hyper-V here. Also fix some minor coding style issues. Sponsored by: Microsoft PR: 211746 Modified: stable/10/sys/boot/efi/loader/copy.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/boot/efi/loader/copy.c ============================================================================== --- stable/10/sys/boot/efi/loader/copy.c Thu Mar 30 12:41:21 2017 (r316272) +++ stable/10/sys/boot/efi/loader/copy.c Thu Mar 30 12:51:44 2017 (r316273) @@ -39,12 +39,135 @@ __FBSDID("$FreeBSD$"); #include "loader_efi.h" +#if defined(__i386__) || defined(__amd64__) +#include +#include + +/* + * The code is excerpted from sys/x86/x86/identcpu.c: identify_cpu(), + * identify_hypervisor(), and dev/hyperv/vmbus/hyperv.c: hyperv_identify(). + */ +#define CPUID_LEAF_HV_MAXLEAF 0x40000000 +#define CPUID_LEAF_HV_INTERFACE 0x40000001 +#define CPUID_LEAF_HV_FEATURES 0x40000003 +#define CPUID_LEAF_HV_LIMITS 0x40000005 +#define CPUID_HV_IFACE_HYPERV 0x31237648 /* HV#1 */ +#define CPUID_HV_MSR_TIME_REFCNT 0x0002 /* MSR_HV_TIME_REF_COUNT */ +#define CPUID_HV_MSR_HYPERCALL 0x0020 + +static int +running_on_hyperv(void) +{ + char hv_vendor[16]; + uint32_t regs[4]; + + do_cpuid(1, regs); + if ((regs[2] & CPUID2_HV) == 0) + return (0); + + do_cpuid(CPUID_LEAF_HV_MAXLEAF, regs); + if (regs[0] < CPUID_LEAF_HV_LIMITS) + return (0); + + ((uint32_t *)&hv_vendor)[0] = regs[1]; + ((uint32_t *)&hv_vendor)[1] = regs[2]; + ((uint32_t *)&hv_vendor)[2] = regs[3]; + hv_vendor[12] = '\0'; + if (strcmp(hv_vendor, "Microsoft Hv") != 0) + return (0); + + do_cpuid(CPUID_LEAF_HV_INTERFACE, regs); + if (regs[0] != CPUID_HV_IFACE_HYPERV) + return (0); + + do_cpuid(CPUID_LEAF_HV_FEATURES, regs); + if ((regs[0] & CPUID_HV_MSR_HYPERCALL) == 0) + return (0); + if ((regs[0] & CPUID_HV_MSR_TIME_REFCNT) == 0) + return (0); + + return (1); +} + +#define KERNEL_PHYSICAL_BASE (2*1024*1024) + +static void +efi_verify_staging_size(unsigned long *nr_pages) +{ + UINTN sz; + EFI_MEMORY_DESCRIPTOR *map, *p; + EFI_PHYSICAL_ADDRESS start, end; + UINTN key, dsz; + UINT32 dver; + EFI_STATUS status; + int i, ndesc; + unsigned long available_pages = 0; + + sz = 0; + status = BS->GetMemoryMap(&sz, 0, &key, &dsz, &dver); + if (status != EFI_BUFFER_TOO_SMALL) { + printf("Can't determine memory map size\n"); + return; + } + + map = malloc(sz); + status = BS->GetMemoryMap(&sz, map, &key, &dsz, &dver); + if (EFI_ERROR(status)) { + printf("Can't read memory map\n"); + goto out; + } + + ndesc = sz / dsz; + for (i = 0, p = map; i < ndesc; + i++, p = NextMemoryDescriptor(p, dsz)) { + start = p->PhysicalStart; + end = start + p->NumberOfPages * EFI_PAGE_SIZE; + + if (KERNEL_PHYSICAL_BASE < start || + KERNEL_PHYSICAL_BASE >= end) + continue; + + available_pages = p->NumberOfPages - + ((KERNEL_PHYSICAL_BASE - start) >> EFI_PAGE_SHIFT); + break; + } + + if (available_pages == 0) { + printf("Can't find valid memory map for staging area!\n"); + goto out; + } + + i++; + p = NextMemoryDescriptor(p, dsz); + + for ( ; i < ndesc; + i++, p = NextMemoryDescriptor(p, dsz)) { + if (p->Type != EfiConventionalMemory && + p->Type != EfiLoaderData) + break; + + if (p->PhysicalStart != end) + break; + + end = p->PhysicalStart + p->NumberOfPages * EFI_PAGE_SIZE; + + available_pages += p->NumberOfPages; + } + + if (*nr_pages > available_pages) { + printf("Staging area's size is reduced: %ld -> %ld!\n", + *nr_pages, available_pages); + *nr_pages = available_pages; + } +out: + free(map); +} +#endif /* __i386__ || __amd64__ */ + #ifndef EFI_STAGING_SIZE #define EFI_STAGING_SIZE 48 #endif -#define STAGE_PAGES EFI_SIZE_TO_PAGES((EFI_STAGING_SIZE) * 1024 * 1024) - EFI_PHYSICAL_ADDRESS staging, staging_end; int stage_offset_set = 0; ssize_t stage_offset; @@ -54,14 +177,37 @@ efi_copy_init(void) { EFI_STATUS status; + unsigned long nr_pages; + + nr_pages = EFI_SIZE_TO_PAGES((EFI_STAGING_SIZE) * 1024 * 1024); + +#if defined(__i386__) || defined(__amd64__) + /* + * We'll decrease nr_pages, if it's too big. Currently we only + * apply this to FreeBSD VM running on Hyper-V. Why? Please see + * https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=211746#c28 + */ + if (running_on_hyperv()) + efi_verify_staging_size(&nr_pages); + + /* + * The staging area must reside in the the first 1GB physical + * memory: see elf64_exec() in + * boot/efi/loader/arch/amd64/elf64_freebsd.c. + */ + staging = 1024*1024*1024; + status = BS->AllocatePages(AllocateMaxAddress, EfiLoaderData, + nr_pages, &staging); +#else status = BS->AllocatePages(AllocateAnyPages, EfiLoaderData, - STAGE_PAGES, &staging); + nr_pages, &staging); +#endif if (EFI_ERROR(status)) { printf("failed to allocate staging area: %lu\n", EFI_ERROR_CODE(status)); return (status); } - staging_end = staging + STAGE_PAGES * EFI_PAGE_SIZE; + staging_end = staging + nr_pages * EFI_PAGE_SIZE; return (0); } From owner-svn-src-stable-10@freebsd.org Thu Mar 30 15:06:00 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 28EE3D24AF9; Thu, 30 Mar 2017 15:06:00 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ECA7A197; Thu, 30 Mar 2017 15:05:59 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2UF5xlN022779; Thu, 30 Mar 2017 15:05:59 GMT (envelope-from ed@FreeBSD.org) Received: (from ed@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2UF5xnQ022778; Thu, 30 Mar 2017 15:05:59 GMT (envelope-from ed@FreeBSD.org) Message-Id: <201703301505.v2UF5xnQ022778@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ed set sender to ed@FreeBSD.org using -f From: Ed Schouten Date: Thu, 30 Mar 2017 15:05:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r316277 - stable/10/sys/sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Mar 2017 15:06:00 -0000 Author: ed Date: Thu Mar 30 15:05:58 2017 New Revision: 316277 URL: https://svnweb.freebsd.org/changeset/base/316277 Log: MFC r315732: Add forward declaration for struct vnode. The coredump() function provided by this header file has struct vnode * as an argument. Modified: stable/10/sys/sys/imgact_elf.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/sys/imgact_elf.h ============================================================================== --- stable/10/sys/sys/imgact_elf.h Thu Mar 30 15:05:49 2017 (r316276) +++ stable/10/sys/sys/imgact_elf.h Thu Mar 30 15:05:58 2017 (r316277) @@ -38,6 +38,7 @@ #define AUXARGS_ENTRY(pos, id, val) {suword(pos++, id); suword(pos++, val);} struct thread; +struct vnode; /* * Structure used to pass information from the loader to the From owner-svn-src-stable-10@freebsd.org Fri Mar 31 04:42:02 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4D26BD263FC; Fri, 31 Mar 2017 04:42:02 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E628B88C; Fri, 31 Mar 2017 04:42:01 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2V4g1rV056330; Fri, 31 Mar 2017 04:42:01 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2V4g0JR056329; Fri, 31 Mar 2017 04:42:00 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201703310442.v2V4g0JR056329@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 31 Mar 2017 04:42:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r316316 - stable/10/lib/libcam X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Mar 2017 04:42:02 -0000 Author: ngie Date: Fri Mar 31 04:42:00 2017 New Revision: 316316 URL: https://svnweb.freebsd.org/changeset/base/316316 Log: MFC r316080,r316081,r316115: r316080: Fix some localized style(9) issues and reword CAM_ERRBUF_SIZE description The CAM_ERRBUF_SIZE description rewording fixes a typo by proxy. r316081: Use `sizeof(cam_errbuf)` instead of `CAM_ERRBUF_SIZE` in snprintf calls Reindent snprintf calls' arguments to match style(9) guidelines with respect to indentation. r316115: libcam: use __func__ instead of hardcoding the function name as `func_name` Tested with: `cam_device_copy(NULL, NULL)` // ;).. Modified: stable/10/lib/libcam/camlib.c stable/10/lib/libcam/camlib.h Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libcam/camlib.c ============================================================================== --- stable/10/lib/libcam/camlib.c Fri Mar 31 03:11:25 2017 (r316315) +++ stable/10/lib/libcam/camlib.c Fri Mar 31 04:42:00 2017 (r316316) @@ -114,16 +114,14 @@ cam_freeccb(union ccb *ccb) int cam_get_device(const char *path, char *dev_name, int devnamelen, int *unit) { - char *func_name = "cam_get_device"; char *tmpstr, *tmpstr2; char *newpath; int unit_offset; int i; - if (path == NULL) { - snprintf(cam_errbuf, CAM_ERRBUF_SIZE, - "%s: device pathname was NULL", func_name); + snprintf(cam_errbuf, sizeof(cam_errbuf), + "%s: device pathname was NULL", __func__); return(-1); } @@ -145,8 +143,8 @@ cam_get_device(const char *path, char *d } if (*tmpstr == '\0') { - snprintf(cam_errbuf, CAM_ERRBUF_SIZE, - "%s: no text after slash", func_name); + snprintf(cam_errbuf, sizeof(cam_errbuf), + "%s: no text after slash", __func__); free(newpath); return(-1); } @@ -173,9 +171,9 @@ cam_get_device(const char *path, char *d * If we only have 1, we don't have a valid device name. */ if (strlen(tmpstr) < 2) { - snprintf(cam_errbuf, CAM_ERRBUF_SIZE, - "%s: must have both device name and unit number", - func_name); + snprintf(cam_errbuf, sizeof(cam_errbuf), + "%s: must have both device name and unit number", + __func__); free(newpath); return(-1); } @@ -185,9 +183,9 @@ cam_get_device(const char *path, char *d * has probably given us all numbers. Point out the error. */ if (isdigit(*tmpstr)) { - snprintf(cam_errbuf, CAM_ERRBUF_SIZE, - "%s: device name cannot begin with a number", - func_name); + snprintf(cam_errbuf, sizeof(cam_errbuf), + "%s: device name cannot begin with a number", + __func__); free(newpath); return(-1); } @@ -198,8 +196,8 @@ cam_get_device(const char *path, char *d * or he gave us a device name/number format we don't recognize. */ if (!isdigit(tmpstr[strlen(tmpstr) - 1])) { - snprintf(cam_errbuf, CAM_ERRBUF_SIZE, - "%s: unable to find device unit number", func_name); + snprintf(cam_errbuf, sizeof(cam_errbuf), + "%s: unable to find device unit number", __func__); free(newpath); return(-1); } @@ -271,13 +269,12 @@ cam_open_btl(path_id_t path_id, target_i { union ccb ccb; struct periph_match_pattern *match_pat; - char *func_name = "cam_open_btl"; int fd, bufsize; if ((fd = open(XPT_DEVICE, O_RDWR)) < 0) { - snprintf(cam_errbuf, CAM_ERRBUF_SIZE, - "%s: couldn't open %s\n%s: %s", func_name, XPT_DEVICE, - func_name, strerror(errno)); + snprintf(cam_errbuf, sizeof(cam_errbuf), + "%s: couldn't open %s\n%s: %s", __func__, XPT_DEVICE, + __func__, strerror(errno)); return(NULL); } @@ -292,8 +289,8 @@ cam_open_btl(path_id_t path_id, target_i ccb.cdm.match_buf_len = bufsize; ccb.cdm.matches = (struct dev_match_result *)malloc(bufsize); if (ccb.cdm.matches == NULL) { - snprintf(cam_errbuf, CAM_ERRBUF_SIZE, - "%s: couldn't malloc match buffer", func_name); + snprintf(cam_errbuf, sizeof(cam_errbuf), + "%s: couldn't malloc match buffer", __func__); close(fd); return(NULL); } @@ -305,8 +302,8 @@ cam_open_btl(path_id_t path_id, target_i ccb.cdm.patterns = (struct dev_match_pattern *)malloc( sizeof(struct dev_match_pattern)); if (ccb.cdm.patterns == NULL) { - snprintf(cam_errbuf, CAM_ERRBUF_SIZE, - "%s: couldn't malloc pattern buffer", func_name); + snprintf(cam_errbuf, sizeof(cam_errbuf), + "%s: couldn't malloc pattern buffer", __func__); free(ccb.cdm.matches); ccb.cdm.matches = NULL; close(fd); @@ -328,9 +325,9 @@ cam_open_btl(path_id_t path_id, target_i PERIPH_MATCH_LUN | PERIPH_MATCH_NAME; if (ioctl(fd, CAMIOCOMMAND, &ccb) == -1) { - snprintf(cam_errbuf, CAM_ERRBUF_SIZE, - "%s: CAMIOCOMMAND ioctl failed\n" - "%s: %s", func_name, func_name, strerror(errno)); + snprintf(cam_errbuf, sizeof(cam_errbuf), + "%s: CAMIOCOMMAND ioctl failed\n" + "%s: %s", __func__, __func__, strerror(errno)); goto btl_bailout; } @@ -340,26 +337,26 @@ cam_open_btl(path_id_t path_id, target_i if ((ccb.ccb_h.status != CAM_REQ_CMP) || ((ccb.cdm.status != CAM_DEV_MATCH_LAST) && (ccb.cdm.status != CAM_DEV_MATCH_MORE))) { - snprintf(cam_errbuf, CAM_ERRBUF_SIZE, - "%s: CAM error %#x, CDM error %d " - "returned from XPT_DEV_MATCH ccb", func_name, - ccb.ccb_h.status, ccb.cdm.status); + snprintf(cam_errbuf, sizeof(cam_errbuf), + "%s: CAM error %#x, CDM error %d " + "returned from XPT_DEV_MATCH ccb", __func__, + ccb.ccb_h.status, ccb.cdm.status); goto btl_bailout; } if (ccb.cdm.status == CAM_DEV_MATCH_MORE) { - snprintf(cam_errbuf, CAM_ERRBUF_SIZE, - "%s: CDM reported more than one" - " passthrough device at %d:%d:%jx!!\n", - func_name, path_id, target_id, (uintmax_t)target_lun); + snprintf(cam_errbuf, sizeof(cam_errbuf), + "%s: CDM reported more than one" + " passthrough device at %d:%d:%jx!!\n", + __func__, path_id, target_id, (uintmax_t)target_lun); goto btl_bailout; } if (ccb.cdm.num_matches == 0) { - snprintf(cam_errbuf, CAM_ERRBUF_SIZE, - "%s: no passthrough device found at" - " %d:%d:%jx", func_name, path_id, target_id, - (uintmax_t)target_lun); + snprintf(cam_errbuf, sizeof(cam_errbuf), + "%s: no passthrough device found at" + " %d:%d:%jx", __func__, path_id, target_id, + (uintmax_t)target_lun); goto btl_bailout; } @@ -382,9 +379,9 @@ cam_open_btl(path_id_t path_id, target_i break; /* NOTREACHED */ } default: - snprintf(cam_errbuf, CAM_ERRBUF_SIZE, - "%s: asked for a peripheral match, but" - " got a bus or device match", func_name); + snprintf(cam_errbuf, sizeof(cam_errbuf), + "%s: asked for a peripheral match, but" + " got a bus or device match", __func__); goto btl_bailout; break; /* NOTREACHED */ } @@ -418,7 +415,6 @@ cam_lookup_pass(const char *dev_name, in int fd; union ccb ccb; char dev_path[256]; - char *func_name = "cam_lookup_pass"; /* * The flags argument above only applies to the actual passthrough @@ -426,9 +422,9 @@ cam_lookup_pass(const char *dev_name, in * passthrough device. */ if ((fd = open(XPT_DEVICE, O_RDWR)) < 0) { - snprintf(cam_errbuf, CAM_ERRBUF_SIZE, - "%s: couldn't open %s\n%s: %s", func_name, XPT_DEVICE, - func_name, strerror(errno)); + snprintf(cam_errbuf, sizeof(cam_errbuf), + "%s: couldn't open %s\n%s: %s", __func__, XPT_DEVICE, + __func__, strerror(errno)); return(NULL); } @@ -457,12 +453,12 @@ cam_lookup_pass(const char *dev_name, in snprintf(tmpstr, sizeof(tmpstr), "\n%s: either the pass driver isn't in " "your kernel\n%s: or %s%d doesn't exist", - func_name, func_name, dev_name, unit); + __func__, __func__, dev_name, unit); } - snprintf(cam_errbuf, CAM_ERRBUF_SIZE, - "%s: CAMGETPASSTHRU ioctl failed\n" - "%s: %s%s", func_name, func_name, strerror(errno), - (errno == ENOENT) ? tmpstr : ""); + snprintf(cam_errbuf, sizeof(cam_errbuf), + "%s: CAMGETPASSTHRU ioctl failed\n" + "%s: %s%s", __func__, __func__, strerror(errno), + (errno == ENOENT) ? tmpstr : ""); close(fd); return(NULL); @@ -477,9 +473,9 @@ cam_lookup_pass(const char *dev_name, in * the device the user gave us. */ if (ccb.cgdl.status == CAM_GDEVLIST_ERROR) { - snprintf(cam_errbuf, CAM_ERRBUF_SIZE, - "%s: device %s%d does not exist!", - func_name, dev_name, unit); + snprintf(cam_errbuf, sizeof(cam_errbuf), + "%s: device %s%d does not exist!", + __func__, dev_name, unit); return(NULL); } @@ -499,7 +495,6 @@ cam_real_open_device(const char *path, i const char *given_path, const char *given_dev_name, int given_unit_number) { - char *func_name = "cam_real_open_device"; union ccb ccb; int fd = -1, malloced_device = 0; @@ -509,10 +504,10 @@ cam_real_open_device(const char *path, i if (device == NULL) { if ((device = (struct cam_device *)malloc( sizeof(struct cam_device))) == NULL) { - snprintf(cam_errbuf, CAM_ERRBUF_SIZE, - "%s: device structure malloc" - " failed\n%s: %s", func_name, func_name, - strerror(errno)); + snprintf(cam_errbuf, sizeof(cam_errbuf), + "%s: device structure malloc" + " failed\n%s: %s", __func__, __func__, + strerror(errno)); return(NULL); } device->fd = -1; @@ -540,10 +535,10 @@ cam_real_open_device(const char *path, i device->given_unit_number = given_unit_number; if ((fd = open(path, flags)) < 0) { - snprintf(cam_errbuf, CAM_ERRBUF_SIZE, - "%s: couldn't open passthrough device %s\n" - "%s: %s", func_name, path, func_name, - strerror(errno)); + snprintf(cam_errbuf, sizeof(cam_errbuf), + "%s: couldn't open passthrough device %s\n" + "%s: %s", __func__, path, __func__, + strerror(errno)); goto crod_bailout; } @@ -568,9 +563,9 @@ cam_real_open_device(const char *path, i * because we just opened it above. The only way this * ioctl can fail is if the ccb size is wrong. */ - snprintf(cam_errbuf, CAM_ERRBUF_SIZE, - "%s: CAMGETPASSTHRU ioctl failed\n" - "%s: %s", func_name, func_name, strerror(errno)); + snprintf(cam_errbuf, sizeof(cam_errbuf), + "%s: CAMGETPASSTHRU ioctl failed\n" + "%s: %s", __func__, __func__, strerror(errno)); goto crod_bailout; } @@ -581,8 +576,8 @@ cam_real_open_device(const char *path, i * the device the user gave us. */ if (ccb.cgdl.status == CAM_GDEVLIST_ERROR) { - snprintf(cam_errbuf, CAM_ERRBUF_SIZE, - "%s: passthrough device does not exist!", func_name); + snprintf(cam_errbuf, sizeof(cam_errbuf), + "%s: passthrough device does not exist!", __func__); goto crod_bailout; } @@ -595,9 +590,9 @@ cam_real_open_device(const char *path, i ccb.ccb_h.func_code = XPT_PATH_INQ; if (ioctl(fd, CAMIOCOMMAND, &ccb) == -1) { - snprintf(cam_errbuf, CAM_ERRBUF_SIZE, - "%s: Path Inquiry CCB failed\n" - "%s: %s", func_name, func_name, strerror(errno)); + snprintf(cam_errbuf, sizeof(cam_errbuf), + "%s: Path Inquiry CCB failed\n" + "%s: %s", __func__, __func__, strerror(errno)); goto crod_bailout; } strlcpy(device->sim_name, ccb.cpi.dev_name, sizeof(device->sim_name)); @@ -610,9 +605,9 @@ cam_real_open_device(const char *path, i */ ccb.ccb_h.func_code = XPT_GDEV_TYPE; if (ioctl(fd, CAMIOCOMMAND, &ccb) == -1) { - snprintf(cam_errbuf, CAM_ERRBUF_SIZE, - "%s: Get Device Type CCB failed\n" - "%s: %s", func_name, func_name, strerror(errno)); + snprintf(cam_errbuf, sizeof(cam_errbuf), + "%s: Get Device Type CCB failed\n" + "%s: %s", __func__, __func__, strerror(errno)); goto crod_bailout; } device->pd_type = SID_TYPE(&ccb.cgd.inq_data); @@ -634,9 +629,9 @@ cam_real_open_device(const char *path, i ccb.cts.type = CTS_TYPE_CURRENT_SETTINGS; if (ioctl(fd, CAMIOCOMMAND, &ccb) == -1) { - snprintf(cam_errbuf, CAM_ERRBUF_SIZE, - "%s: Get Transfer Settings CCB failed\n" - "%s: %s", func_name, func_name, strerror(errno)); + snprintf(cam_errbuf, sizeof(cam_errbuf), + "%s: Get Transfer Settings CCB failed\n" + "%s: %s", __func__, __func__, strerror(errno)); goto crod_bailout; } if (ccb.cts.transport == XPORT_SPI) { @@ -713,20 +708,19 @@ cam_path_string(struct cam_device *dev, struct cam_device * cam_device_dup(struct cam_device *device) { - char *func_name = "cam_device_dup"; struct cam_device *newdev; if (device == NULL) { - snprintf(cam_errbuf, CAM_ERRBUF_SIZE, - "%s: device is NULL", func_name); - return(NULL); + snprintf(cam_errbuf, sizeof(cam_errbuf), + "%s: device is NULL", __func__); + return (NULL); } newdev = malloc(sizeof(struct cam_device)); if (newdev == NULL) { - snprintf(cam_errbuf, CAM_ERRBUF_SIZE, - "%s: couldn't malloc CAM device structure", func_name); - return(NULL); + snprintf(cam_errbuf, sizeof(cam_errbuf), + "%s: couldn't malloc CAM device structure", __func__); + return (NULL); } bcopy(device, newdev, sizeof(struct cam_device)); @@ -740,17 +734,16 @@ cam_device_dup(struct cam_device *device void cam_device_copy(struct cam_device *src, struct cam_device *dst) { - char *func_name = "cam_device_copy"; if (src == NULL) { - snprintf(cam_errbuf, CAM_ERRBUF_SIZE, - "%s: source device struct was NULL", func_name); + snprintf(cam_errbuf, sizeof(cam_errbuf), + "%s: source device struct was NULL", __func__); return; } if (dst == NULL) { - snprintf(cam_errbuf, CAM_ERRBUF_SIZE, - "%s: destination device struct was NULL", func_name); + snprintf(cam_errbuf, sizeof(cam_errbuf), + "%s: destination device struct was NULL", __func__); return; } Modified: stable/10/lib/libcam/camlib.h ============================================================================== --- stable/10/lib/libcam/camlib.h Fri Mar 31 03:11:25 2017 (r316315) +++ stable/10/lib/libcam/camlib.h Fri Mar 31 04:42:00 2017 (r316316) @@ -70,13 +70,13 @@ #include #include -#define CAM_ERRBUF_SIZE 2048 /* sizeof the CAM libarary error string */ +#define CAM_ERRBUF_SIZE 2048 /* CAM library error string size */ /* * Right now we hard code the transport layer device, but this will change * if we ever get more than one transport layer. */ -#define XPT_DEVICE "/dev/xpt0" +#define XPT_DEVICE "/dev/xpt0" extern char cam_errbuf[]; From owner-svn-src-stable-10@freebsd.org Fri Mar 31 04:43:26 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9A467D26559; Fri, 31 Mar 2017 04:43:26 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6C175AF1; Fri, 31 Mar 2017 04:43:26 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2V4hPgw056543; Fri, 31 Mar 2017 04:43:25 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2V4hPIu056542; Fri, 31 Mar 2017 04:43:25 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201703310443.v2V4hPIu056542@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 31 Mar 2017 04:43:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r316319 - stable/10/sys/boot/common X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Mar 2017 04:43:26 -0000 Author: ngie Date: Fri Mar 31 04:43:25 2017 New Revision: 316319 URL: https://svnweb.freebsd.org/changeset/base/316319 Log: MFC r316108: Remove -Wunused-but-set variable, `tail` in `ls_getdir(..)` This variable has been unused since its inception in r40106. Modified: stable/10/sys/boot/common/ls.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/boot/common/ls.c ============================================================================== --- stable/10/sys/boot/common/ls.c Fri Mar 31 04:43:21 2017 (r316318) +++ stable/10/sys/boot/common/ls.c Fri Mar 31 04:43:25 2017 (r316319) @@ -139,9 +139,8 @@ ls_getdir(char **pathp) struct stat sb; int fd; const char *cp; - char *path, *tail; + char *path; - tail = NULL; fd = -1; /* one extra byte for a possible trailing slash required */ From owner-svn-src-stable-10@freebsd.org Fri Mar 31 04:44:39 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F3FC9D26607; Fri, 31 Mar 2017 04:44:38 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C5B05CEA; Fri, 31 Mar 2017 04:44:38 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2V4ib2N056728; Fri, 31 Mar 2017 04:44:37 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2V4ibiS056727; Fri, 31 Mar 2017 04:44:37 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201703310444.v2V4ibiS056727@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 31 Mar 2017 04:44:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r316321 - stable/10/sys/boot/zfs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Mar 2017 04:44:39 -0000 Author: ngie Date: Fri Mar 31 04:44:37 2017 New Revision: 316321 URL: https://svnweb.freebsd.org/changeset/base/316321 Log: MFC r316107: Remove redundant declaration for `zfs_crc64_table` zfssubr.c already defines this statically. Besides, zfsimpl.c defined it, but didn't use it. This fixes a -Wredundant-decls warning. Modified: stable/10/sys/boot/zfs/zfsimpl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/boot/zfs/zfsimpl.c ============================================================================== --- stable/10/sys/boot/zfs/zfsimpl.c Fri Mar 31 04:44:35 2017 (r316320) +++ stable/10/sys/boot/zfs/zfsimpl.c Fri Mar 31 04:44:37 2017 (r316321) @@ -66,7 +66,6 @@ static const char *features_for_read[] = */ static spa_list_t zfs_pools; -static uint64_t zfs_crc64_table[256]; static const dnode_phys_t *dnode_cache_obj = 0; static uint64_t dnode_cache_bn; static char *dnode_cache_buf; From owner-svn-src-stable-10@freebsd.org Fri Mar 31 04:51:09 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EF22FD26872; Fri, 31 Mar 2017 04:51:09 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A5BD52AA; Fri, 31 Mar 2017 04:51:09 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2V4p8Wb060026; Fri, 31 Mar 2017 04:51:08 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2V4p8bf060025; Fri, 31 Mar 2017 04:51:08 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201703310451.v2V4p8bf060025@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Fri, 31 Mar 2017 04:51:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r316323 - stable/10/sys/boot/zfs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Mar 2017 04:51:10 -0000 Author: ngie Date: Fri Mar 31 04:51:08 2017 New Revision: 316323 URL: https://svnweb.freebsd.org/changeset/base/316323 Log: MFC r316106: Don't shadow read(2) definition with `read` argument in vdev_{create,probe} This fixes several -Wshadow warnings introduced in r192194, but now errors with gcc 6.3.0. Modified: stable/10/sys/boot/zfs/zfsimpl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/boot/zfs/zfsimpl.c ============================================================================== --- stable/10/sys/boot/zfs/zfsimpl.c Fri Mar 31 04:51:03 2017 (r316322) +++ stable/10/sys/boot/zfs/zfsimpl.c Fri Mar 31 04:51:08 2017 (r316323) @@ -488,7 +488,7 @@ vdev_find(uint64_t guid) } static vdev_t * -vdev_create(uint64_t guid, vdev_read_t *read) +vdev_create(uint64_t guid, vdev_read_t *_read) { vdev_t *vdev; @@ -497,7 +497,7 @@ vdev_create(uint64_t guid, vdev_read_t * STAILQ_INIT(&vdev->v_children); vdev->v_guid = guid; vdev->v_state = VDEV_STATE_OFFLINE; - vdev->v_read = read; + vdev->v_read = _read; vdev->v_phys_read = 0; vdev->v_read_priv = 0; STAILQ_INSERT_TAIL(&zfs_vdevs, vdev, v_alllink); @@ -874,7 +874,7 @@ spa_all_status(void) } static int -vdev_probe(vdev_phys_read_t *read, void *read_priv, spa_t **spap) +vdev_probe(vdev_phys_read_t *_read, void *read_priv, spa_t **spap) { vdev_t vtmp; vdev_phys_t *vdev_label = (vdev_phys_t *) zap_scratch; @@ -899,7 +899,7 @@ vdev_probe(vdev_phys_read_t *read, void * uberblock is most current. */ memset(&vtmp, 0, sizeof(vtmp)); - vtmp.v_phys_read = read; + vtmp.v_phys_read = _read; vtmp.v_read_priv = read_priv; off = offsetof(vdev_label_t, vl_vdev_phys); BP_ZERO(&bp); @@ -1025,7 +1025,7 @@ vdev_probe(vdev_phys_read_t *read, void */ vdev = vdev_find(guid); if (vdev) { - vdev->v_phys_read = read; + vdev->v_phys_read = _read; vdev->v_read_priv = read_priv; vdev->v_state = VDEV_STATE_HEALTHY; } else { From owner-svn-src-stable-10@freebsd.org Fri Mar 31 06:33:21 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A251AD26003; Fri, 31 Mar 2017 06:33:21 +0000 (UTC) (envelope-from truckman@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 54C03F70; Fri, 31 Mar 2017 06:33:21 +0000 (UTC) (envelope-from truckman@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2V6XKEM000642; Fri, 31 Mar 2017 06:33:20 GMT (envelope-from truckman@FreeBSD.org) Received: (from truckman@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2V6XKSW000641; Fri, 31 Mar 2017 06:33:20 GMT (envelope-from truckman@FreeBSD.org) Message-Id: <201703310633.v2V6XKSW000641@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: truckman set sender to truckman@FreeBSD.org using -f From: Don Lewis Date: Fri, 31 Mar 2017 06:33:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r316325 - stable/10/sys/netpfil/ipfw X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Mar 2017 06:33:21 -0000 Author: truckman Date: Fri Mar 31 06:33:20 2017 New Revision: 316325 URL: https://svnweb.freebsd.org/changeset/base/316325 Log: MFC r315516 Change several constants used by the PIE algorithm from unsigned to signed. - PIE_MAX_PROB is compared to variable of int64_t and the type promotion rules can cause the value of that variable to be treated as unsigned. If the value is actually negative, then the result of the comparsion is incorrect, causing the algorithm to perform poorly in some situations. Changing the constant to be signed cause the comparision to work correctly. - PIE_SCALE is also compared to signed values. Fortunately they are also compared to zero and negative values are discarded so this is more of a cosmetic fix. - PIE_DQ_THRESHOLD is only compared to unsigned values, but it is small enough that the automatic promotion to unsigned is harmless. Submitted by: Rasool Al-Saadi Modified: stable/10/sys/netpfil/ipfw/dn_aqm_pie.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netpfil/ipfw/dn_aqm_pie.h ============================================================================== --- stable/10/sys/netpfil/ipfw/dn_aqm_pie.h Fri Mar 31 06:20:06 2017 (r316324) +++ stable/10/sys/netpfil/ipfw/dn_aqm_pie.h Fri Mar 31 06:33:20 2017 (r316325) @@ -37,16 +37,16 @@ #define DN_AQM_PIE 2 #define PIE_DQ_THRESHOLD_BITS 14 /* 2^14 =16KB */ -#define PIE_DQ_THRESHOLD (1UL << PIE_DQ_THRESHOLD_BITS) +#define PIE_DQ_THRESHOLD (1L << PIE_DQ_THRESHOLD_BITS) #define MEAN_PKTSIZE 800 /* 31-bits because random() generates range from 0->(2**31)-1 */ #define PIE_PROB_BITS 31 -#define PIE_MAX_PROB ((1ULL< Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E71EAD2713D; Fri, 31 Mar 2017 20:17:32 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8876E396; Fri, 31 Mar 2017 20:17:32 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2VKHVNG031279; Fri, 31 Mar 2017 20:17:31 GMT (envelope-from mm@FreeBSD.org) Received: (from mm@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2VKHUL3031267; Fri, 31 Mar 2017 20:17:30 GMT (envelope-from mm@FreeBSD.org) Message-Id: <201703312017.v2VKHUL3031267@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mm set sender to mm@FreeBSD.org using -f From: Martin Matuska Date: Fri, 31 Mar 2017 20:17:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r316338 - in stable/10: contrib/libarchive contrib/libarchive/cpio contrib/libarchive/libarchive contrib/libarchive/libarchive/test contrib/libarchive/tar contrib/libarchive/tar/test co... X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Mar 2017 20:17:33 -0000 Author: mm Date: Fri Mar 31 20:17:30 2017 New Revision: 316338 URL: https://svnweb.freebsd.org/changeset/base/316338 Log: MFC r315636,315876,316095: Sync libarchive with vendor Vendor changes/bugfixes (FreeBSD-related): r315636: PR 867 (bsdcpio): show numeric uid/gid when names are not found PR 870 (seekable zip): accept files with valid ZIP64 EOCD headers PR 880 (pax): Fix handling of "size" pax header keyword PR 887 (crypto): Discard 3072 bytes instead of 1024 of first keystream OSS-Fuzz issue 806 (mtree): rework mtree_atol10 integer parser Break ACL read/write code into platform-specific source files r315876: Store extended attributes with extattr_set_link() if no fd is provided Add extended attribute tests to libarchive and bsdtar Fix tar's test_option_acls Support the UF_HIDDEN file flag r316095: Constify variables in several places Unify platform ACL code in a single source file Fix unused variable if compiling on FreeBSD without NFSv4 ACL support Added: stable/10/contrib/libarchive/libarchive/archive_disk_acl_freebsd.c - copied unchanged from r316095, head/contrib/libarchive/libarchive/archive_disk_acl_freebsd.c stable/10/contrib/libarchive/libarchive/archive_platform_acl.h - copied unchanged from r315636, head/contrib/libarchive/libarchive/archive_platform_acl.h stable/10/contrib/libarchive/libarchive/archive_platform_xattr.h - copied unchanged from r315876, head/contrib/libarchive/libarchive/archive_platform_xattr.h stable/10/contrib/libarchive/libarchive/archive_version_details.c - copied unchanged from r315636, head/contrib/libarchive/libarchive/archive_version_details.c stable/10/contrib/libarchive/libarchive/test/test_xattr_platform.c - copied unchanged from r315876, head/contrib/libarchive/libarchive/test/test_xattr_platform.c stable/10/contrib/libarchive/tar/test/test_option_xattrs.c - copied unchanged from r315876, head/contrib/libarchive/tar/test/test_option_xattrs.c Deleted: stable/10/contrib/libarchive/libarchive/archive_write_disk_acl.c Modified: stable/10/contrib/libarchive/FREEBSD-Xlist stable/10/contrib/libarchive/NEWS stable/10/contrib/libarchive/cpio/cpio.c stable/10/contrib/libarchive/libarchive/archive_entry.3 stable/10/contrib/libarchive/libarchive/archive_entry.c stable/10/contrib/libarchive/libarchive/archive_entry_acl.3 stable/10/contrib/libarchive/libarchive/archive_getdate.c stable/10/contrib/libarchive/libarchive/archive_pack_dev.c stable/10/contrib/libarchive/libarchive/archive_platform.h stable/10/contrib/libarchive/libarchive/archive_random.c stable/10/contrib/libarchive/libarchive/archive_read_disk_entry_from_file.c stable/10/contrib/libarchive/libarchive/archive_read_disk_private.h stable/10/contrib/libarchive/libarchive/archive_read_open.3 stable/10/contrib/libarchive/libarchive/archive_read_support_format_cab.c stable/10/contrib/libarchive/libarchive/archive_read_support_format_lha.c stable/10/contrib/libarchive/libarchive/archive_read_support_format_mtree.c stable/10/contrib/libarchive/libarchive/archive_read_support_format_tar.c stable/10/contrib/libarchive/libarchive/archive_read_support_format_zip.c stable/10/contrib/libarchive/libarchive/archive_string_sprintf.c stable/10/contrib/libarchive/libarchive/archive_util.c stable/10/contrib/libarchive/libarchive/archive_write_add_filter.c stable/10/contrib/libarchive/libarchive/archive_write_add_filter_by_name.c stable/10/contrib/libarchive/libarchive/archive_write_add_filter_lz4.c stable/10/contrib/libarchive/libarchive/archive_write_add_filter_program.c stable/10/contrib/libarchive/libarchive/archive_write_disk_posix.c stable/10/contrib/libarchive/libarchive/archive_write_disk_private.h stable/10/contrib/libarchive/libarchive/archive_write_set_format.c stable/10/contrib/libarchive/libarchive/archive_write_set_format_by_name.c stable/10/contrib/libarchive/libarchive/archive_write_set_format_filter_by_ext.c stable/10/contrib/libarchive/libarchive/archive_write_set_format_warc.c stable/10/contrib/libarchive/libarchive/test/test_acl_platform_nfs4.c stable/10/contrib/libarchive/libarchive/test/test_acl_platform_posix1e.c stable/10/contrib/libarchive/tar/bsdtar.1 stable/10/contrib/libarchive/tar/test/test_option_acls.c stable/10/contrib/libarchive/test_utils/test_common.h stable/10/contrib/libarchive/test_utils/test_main.c stable/10/lib/libarchive/Makefile stable/10/lib/libarchive/config_freebsd.h stable/10/lib/libarchive/tests/Makefile stable/10/usr.bin/bsdcat/tests/Makefile stable/10/usr.bin/cpio/tests/Makefile stable/10/usr.bin/tar/tests/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/libarchive/FREEBSD-Xlist ============================================================================== --- stable/10/contrib/libarchive/FREEBSD-Xlist Fri Mar 31 20:16:24 2017 (r316337) +++ stable/10/contrib/libarchive/FREEBSD-Xlist Fri Mar 31 20:17:30 2017 (r316338) @@ -21,6 +21,9 @@ doc examples libarchive/CMakeLists.txt libarchive/archive_entry_copy_bhfi.c +libarchive/archive_disk_acl_darwin.c +libarchive/archive_disk_acl_linux.c +libarchive/archive_disk_acl_sunos.c libarchive/archive_read_disk_windows.c libarchive/archive_windows.c libarchive/archive_windows.h Modified: stable/10/contrib/libarchive/NEWS ============================================================================== --- stable/10/contrib/libarchive/NEWS Fri Mar 31 20:16:24 2017 (r316337) +++ stable/10/contrib/libarchive/NEWS Fri Mar 31 20:17:30 2017 (r316338) @@ -1,3 +1,5 @@ +Mar 16, 2017: NFSv4 ACL support for Linux (librichacl) + Feb 26, 2017: libarchive 3.3.1 released Security & Feature release @@ -293,7 +295,7 @@ May 04, 2008: libarchive 2.5.3b released * libarchive: Mark which entry strings are set; be accurate about distinguishing empty strings ("") from unset ones (NULL) * tar: Don't crash reading entries with empty filenames - * libarchive_test, bsdtar_test, bsdcpio_test: Better detaults: + * libarchive_test, bsdtar_test, bsdcpio_test: Better defaults: run all tests, delete temp dirs, summarize repeated failures * -no-undefined to libtool for Cygwin * libarchive_test: Skip large file tests on systems with 32-bit off_t Modified: stable/10/contrib/libarchive/cpio/cpio.c ============================================================================== --- stable/10/contrib/libarchive/cpio/cpio.c Fri Mar 31 20:16:24 2017 (r316337) +++ stable/10/contrib/libarchive/cpio/cpio.c Fri Mar 31 20:17:30 2017 (r316338) @@ -1344,23 +1344,23 @@ lookup_name(struct cpio *cpio, struct na cache->cache[slot].name = NULL; } - if (lookup_fn(cpio, &name, id) == 0) { - if (name == NULL || name[0] == '\0') { - /* If lookup failed, format it as a number. */ - snprintf(asnum, sizeof(asnum), "%u", (unsigned)id); - name = asnum; - } - cache->cache[slot].name = strdup(name); - if (cache->cache[slot].name != NULL) { - cache->cache[slot].id = id; - return (cache->cache[slot].name); - } - /* - * Conveniently, NULL marks an empty slot, so - * if the strdup() fails, we've just failed to - * cache it. No recovery necessary. - */ - } + if (lookup_fn(cpio, &name, id)) { + /* If lookup failed, format it as a number. */ + snprintf(asnum, sizeof(asnum), "%u", (unsigned)id); + name = asnum; + } + + cache->cache[slot].name = strdup(name); + if (cache->cache[slot].name != NULL) { + cache->cache[slot].id = id; + return (cache->cache[slot].name); + } + + /* + * Conveniently, NULL marks an empty slot, so + * if the strdup() fails, we've just failed to + * cache it. No recovery necessary. + */ return (NULL); } @@ -1381,15 +1381,14 @@ lookup_uname_helper(struct cpio *cpio, c errno = 0; pwent = getpwuid((uid_t)id); if (pwent == NULL) { - *name = NULL; - if (errno != 0 && errno != ENOENT) + if (errno && errno != ENOENT) lafe_warnc(errno, "getpwuid(%s) failed", cpio_i64toa((int64_t)id)); - return (errno); + return 1; } *name = pwent->pw_name; - return (0); + return 0; } static const char * @@ -1409,15 +1408,14 @@ lookup_gname_helper(struct cpio *cpio, c errno = 0; grent = getgrgid((gid_t)id); if (grent == NULL) { - *name = NULL; - if (errno != 0) + if (errno && errno != ENOENT) lafe_warnc(errno, "getgrgid(%s) failed", cpio_i64toa((int64_t)id)); - return (errno); + return 1; } *name = grent->gr_name; - return (0); + return 0; } /* Copied: stable/10/contrib/libarchive/libarchive/archive_disk_acl_freebsd.c (from r316095, head/contrib/libarchive/libarchive/archive_disk_acl_freebsd.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/contrib/libarchive/libarchive/archive_disk_acl_freebsd.c Fri Mar 31 20:17:30 2017 (r316338, copy of r316095, head/contrib/libarchive/libarchive/archive_disk_acl_freebsd.c) @@ -0,0 +1,700 @@ +/*- + * Copyright (c) 2003-2009 Tim Kientzle + * Copyright (c) 2010-2012 Michihiro NAKAJIMA + * Copyright (c) 2017 Martin Matuska + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "archive_platform.h" + +#if ARCHIVE_ACL_FREEBSD + +#ifdef HAVE_ERRNO_H +#include +#endif +#ifdef HAVE_FCNTL_H +#include +#endif +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_SYS_ACL_H +#define _ACL_PRIVATE /* For debugging */ +#include +#endif + +#include "archive_entry.h" +#include "archive_private.h" +#include "archive_read_disk_private.h" +#include "archive_write_disk_private.h" + +typedef struct { + const int a_perm; /* Libarchive permission or flag */ + const int p_perm; /* Platform permission or flag */ +} acl_perm_map_t; + +static const acl_perm_map_t acl_posix_perm_map[] = { + {ARCHIVE_ENTRY_ACL_EXECUTE, ACL_EXECUTE}, + {ARCHIVE_ENTRY_ACL_WRITE, ACL_WRITE}, + {ARCHIVE_ENTRY_ACL_READ, ACL_READ}, +}; + +static const int acl_posix_perm_map_size = + (int)(sizeof(acl_posix_perm_map)/sizeof(acl_posix_perm_map[0])); + +#if ARCHIVE_ACL_FREEBSD_NFS4 +static const acl_perm_map_t acl_nfs4_perm_map[] = { + {ARCHIVE_ENTRY_ACL_EXECUTE, ACL_EXECUTE}, + {ARCHIVE_ENTRY_ACL_READ_DATA, ACL_READ_DATA}, + {ARCHIVE_ENTRY_ACL_LIST_DIRECTORY, ACL_LIST_DIRECTORY}, + {ARCHIVE_ENTRY_ACL_WRITE_DATA, ACL_WRITE_DATA}, + {ARCHIVE_ENTRY_ACL_ADD_FILE, ACL_ADD_FILE}, + {ARCHIVE_ENTRY_ACL_APPEND_DATA, ACL_APPEND_DATA}, + {ARCHIVE_ENTRY_ACL_ADD_SUBDIRECTORY, ACL_ADD_SUBDIRECTORY}, + {ARCHIVE_ENTRY_ACL_READ_NAMED_ATTRS, ACL_READ_NAMED_ATTRS}, + {ARCHIVE_ENTRY_ACL_WRITE_NAMED_ATTRS, ACL_WRITE_NAMED_ATTRS}, + {ARCHIVE_ENTRY_ACL_DELETE_CHILD, ACL_DELETE_CHILD}, + {ARCHIVE_ENTRY_ACL_READ_ATTRIBUTES, ACL_READ_ATTRIBUTES}, + {ARCHIVE_ENTRY_ACL_WRITE_ATTRIBUTES, ACL_WRITE_ATTRIBUTES}, + {ARCHIVE_ENTRY_ACL_DELETE, ACL_DELETE}, + {ARCHIVE_ENTRY_ACL_READ_ACL, ACL_READ_ACL}, + {ARCHIVE_ENTRY_ACL_WRITE_ACL, ACL_WRITE_ACL}, + {ARCHIVE_ENTRY_ACL_WRITE_OWNER, ACL_WRITE_OWNER}, + {ARCHIVE_ENTRY_ACL_SYNCHRONIZE, ACL_SYNCHRONIZE} +}; + +static const int acl_nfs4_perm_map_size = + (int)(sizeof(acl_nfs4_perm_map)/sizeof(acl_nfs4_perm_map[0])); + +static const acl_perm_map_t acl_nfs4_flag_map[] = { + {ARCHIVE_ENTRY_ACL_ENTRY_FILE_INHERIT, ACL_ENTRY_FILE_INHERIT}, + {ARCHIVE_ENTRY_ACL_ENTRY_DIRECTORY_INHERIT, ACL_ENTRY_DIRECTORY_INHERIT}, + {ARCHIVE_ENTRY_ACL_ENTRY_NO_PROPAGATE_INHERIT, ACL_ENTRY_NO_PROPAGATE_INHERIT}, + {ARCHIVE_ENTRY_ACL_ENTRY_INHERIT_ONLY, ACL_ENTRY_INHERIT_ONLY}, + {ARCHIVE_ENTRY_ACL_ENTRY_SUCCESSFUL_ACCESS, ACL_ENTRY_SUCCESSFUL_ACCESS}, + {ARCHIVE_ENTRY_ACL_ENTRY_FAILED_ACCESS, ACL_ENTRY_FAILED_ACCESS}, + {ARCHIVE_ENTRY_ACL_ENTRY_INHERITED, ACL_ENTRY_INHERITED} +}; + +static const int acl_nfs4_flag_map_size = + (int)(sizeof(acl_nfs4_flag_map)/sizeof(acl_nfs4_flag_map[0])); +#endif /* ARCHIVE_ACL_FREEBSD_NFS4 */ + +static int +translate_acl(struct archive_read_disk *a, + struct archive_entry *entry, acl_t acl, int default_entry_acl_type) +{ +#if ARCHIVE_ACL_FREEBSD_NFS4 + int brand; + acl_flagset_t acl_flagset; + acl_entry_type_t acl_type; +#endif + acl_tag_t acl_tag; + acl_entry_t acl_entry; + acl_permset_t acl_permset; + int i, entry_acl_type, perm_map_size; + const acl_perm_map_t *perm_map; + int r, s, ae_id, ae_tag, ae_perm; + void *q; + const char *ae_name; + +#if ARCHIVE_ACL_FREEBSD_NFS4 + // FreeBSD "brands" ACLs as POSIX.1e or NFSv4 + // Make sure the "brand" on this ACL is consistent + // with the default_entry_acl_type bits provided. + if (acl_get_brand_np(acl, &brand) != 0) { + archive_set_error(&a->archive, errno, + "Failed to read ACL brand"); + return (ARCHIVE_WARN); + } + switch (brand) { + case ACL_BRAND_POSIX: + switch (default_entry_acl_type) { + case ARCHIVE_ENTRY_ACL_TYPE_ACCESS: + case ARCHIVE_ENTRY_ACL_TYPE_DEFAULT: + break; + default: + archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC, + "Invalid ACL entry type for POSIX.1e ACL"); + return (ARCHIVE_WARN); + } + break; + case ACL_BRAND_NFS4: + if (default_entry_acl_type & ~ARCHIVE_ENTRY_ACL_TYPE_NFS4) { + archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC, + "Invalid ACL entry type for NFSv4 ACL"); + return (ARCHIVE_WARN); + } + break; + default: + archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC, + "Unknown ACL brand"); + return (ARCHIVE_WARN); + } +#endif + + s = acl_get_entry(acl, ACL_FIRST_ENTRY, &acl_entry); + if (s == -1) { + archive_set_error(&a->archive, errno, + "Failed to get first ACL entry"); + return (ARCHIVE_WARN); + } + + while (s == 1) { + ae_id = -1; + ae_name = NULL; + ae_perm = 0; + + if (acl_get_tag_type(acl_entry, &acl_tag) != 0) { + archive_set_error(&a->archive, errno, + "Failed to get ACL tag type"); + return (ARCHIVE_WARN); + } + switch (acl_tag) { + case ACL_USER: + q = acl_get_qualifier(acl_entry); + if (q != NULL) { + ae_id = (int)*(uid_t *)q; + acl_free(q); + ae_name = archive_read_disk_uname(&a->archive, + ae_id); + } + ae_tag = ARCHIVE_ENTRY_ACL_USER; + break; + case ACL_GROUP: + q = acl_get_qualifier(acl_entry); + if (q != NULL) { + ae_id = (int)*(gid_t *)q; + acl_free(q); + ae_name = archive_read_disk_gname(&a->archive, + ae_id); + } + ae_tag = ARCHIVE_ENTRY_ACL_GROUP; + break; + case ACL_MASK: + ae_tag = ARCHIVE_ENTRY_ACL_MASK; + break; + case ACL_USER_OBJ: + ae_tag = ARCHIVE_ENTRY_ACL_USER_OBJ; + break; + case ACL_GROUP_OBJ: + ae_tag = ARCHIVE_ENTRY_ACL_GROUP_OBJ; + break; + case ACL_OTHER: + ae_tag = ARCHIVE_ENTRY_ACL_OTHER; + break; +#if ARCHIVE_ACL_FREEBSD_NFS4 + case ACL_EVERYONE: + ae_tag = ARCHIVE_ENTRY_ACL_EVERYONE; + break; +#endif + default: + /* Skip types that libarchive can't support. */ + s = acl_get_entry(acl, ACL_NEXT_ENTRY, &acl_entry); + continue; + } + + // XXX acl_type maps to allow/deny/audit/YYYY bits + entry_acl_type = default_entry_acl_type; + +#if ARCHIVE_ACL_FREEBSD_NFS4 + if (default_entry_acl_type & ARCHIVE_ENTRY_ACL_TYPE_NFS4) { + /* + * acl_get_entry_type_np() fails with non-NFSv4 ACLs + */ + if (acl_get_entry_type_np(acl_entry, &acl_type) != 0) { + archive_set_error(&a->archive, errno, "Failed " + "to get ACL type from a NFSv4 ACL entry"); + return (ARCHIVE_WARN); + } + switch (acl_type) { + case ACL_ENTRY_TYPE_ALLOW: + entry_acl_type = ARCHIVE_ENTRY_ACL_TYPE_ALLOW; + break; + case ACL_ENTRY_TYPE_DENY: + entry_acl_type = ARCHIVE_ENTRY_ACL_TYPE_DENY; + break; + case ACL_ENTRY_TYPE_AUDIT: + entry_acl_type = ARCHIVE_ENTRY_ACL_TYPE_AUDIT; + break; + case ACL_ENTRY_TYPE_ALARM: + entry_acl_type = ARCHIVE_ENTRY_ACL_TYPE_ALARM; + break; + default: + archive_set_error(&a->archive, errno, + "Invalid NFSv4 ACL entry type"); + return (ARCHIVE_WARN); + } + + /* + * Libarchive stores "flag" (NFSv4 inheritance bits) + * in the ae_perm bitmap. + * + * acl_get_flagset_np() fails with non-NFSv4 ACLs + */ + if (acl_get_flagset_np(acl_entry, &acl_flagset) != 0) { + archive_set_error(&a->archive, errno, + "Failed to get flagset from a NFSv4 " + "ACL entry"); + return (ARCHIVE_WARN); + } + for (i = 0; i < acl_nfs4_flag_map_size; ++i) { + r = acl_get_flag_np(acl_flagset, + acl_nfs4_flag_map[i].p_perm); + if (r == -1) { + archive_set_error(&a->archive, errno, + "Failed to check flag in a NFSv4 " + "ACL flagset"); + return (ARCHIVE_WARN); + } else if (r) + ae_perm |= acl_nfs4_flag_map[i].a_perm; + } + } +#endif + + if (acl_get_permset(acl_entry, &acl_permset) != 0) { + archive_set_error(&a->archive, errno, + "Failed to get ACL permission set"); + return (ARCHIVE_WARN); + } + +#if ARCHIVE_ACL_FREEBSD_NFS4 + if (default_entry_acl_type & ARCHIVE_ENTRY_ACL_TYPE_NFS4) { + perm_map_size = acl_nfs4_perm_map_size; + perm_map = acl_nfs4_perm_map; + } else { +#endif + perm_map_size = acl_posix_perm_map_size; + perm_map = acl_posix_perm_map; +#if ARCHIVE_ACL_FREEBSD_NFS4 + } +#endif + + for (i = 0; i < perm_map_size; ++i) { + r = acl_get_perm_np(acl_permset, perm_map[i].p_perm); + if (r == -1) { + archive_set_error(&a->archive, errno, + "Failed to check permission in an ACL " + "permission set"); + return (ARCHIVE_WARN); + } else if (r) + ae_perm |= perm_map[i].a_perm; + } + + archive_entry_acl_add_entry(entry, entry_acl_type, + ae_perm, ae_tag, + ae_id, ae_name); + + s = acl_get_entry(acl, ACL_NEXT_ENTRY, &acl_entry); + if (s == -1) { + archive_set_error(&a->archive, errno, + "Failed to get next ACL entry"); + return (ARCHIVE_WARN); + } + } + return (ARCHIVE_OK); +} + +static int +set_acl(struct archive *a, int fd, const char *name, + struct archive_acl *abstract_acl, + int ae_requested_type, const char *tname) +{ + int acl_type = 0; + acl_t acl; + acl_entry_t acl_entry; + acl_permset_t acl_permset; +#if ARCHIVE_ACL_FREEBSD_NFS4 + acl_flagset_t acl_flagset; + int r; +#endif + int ret; + int ae_type, ae_permset, ae_tag, ae_id; + int perm_map_size; + const acl_perm_map_t *perm_map; + uid_t ae_uid; + gid_t ae_gid; + const char *ae_name; + int entries; + int i; + + ret = ARCHIVE_OK; + entries = archive_acl_reset(abstract_acl, ae_requested_type); + if (entries == 0) + return (ARCHIVE_OK); + + + switch (ae_requested_type) { + case ARCHIVE_ENTRY_ACL_TYPE_ACCESS: + acl_type = ACL_TYPE_ACCESS; + break; + case ARCHIVE_ENTRY_ACL_TYPE_DEFAULT: + acl_type = ACL_TYPE_DEFAULT; + break; +#if ARCHIVE_ACL_FREEBSD_NFS4 + case ARCHIVE_ENTRY_ACL_TYPE_NFS4: + acl_type = ACL_TYPE_NFS4; + break; +#endif + default: + errno = ENOENT; + archive_set_error(a, errno, "Unsupported ACL type"); + return (ARCHIVE_FAILED); + } + + acl = acl_init(entries); + if (acl == (acl_t)NULL) { + archive_set_error(a, errno, + "Failed to initialize ACL working storage"); + return (ARCHIVE_FAILED); + } + + while (archive_acl_next(a, abstract_acl, ae_requested_type, &ae_type, + &ae_permset, &ae_tag, &ae_id, &ae_name) == ARCHIVE_OK) { + if (acl_create_entry(&acl, &acl_entry) != 0) { + archive_set_error(a, errno, + "Failed to create a new ACL entry"); + ret = ARCHIVE_FAILED; + goto exit_free; + } + switch (ae_tag) { + case ARCHIVE_ENTRY_ACL_USER: + ae_uid = archive_write_disk_uid(a, ae_name, ae_id); + acl_set_tag_type(acl_entry, ACL_USER); + acl_set_qualifier(acl_entry, &ae_uid); + break; + case ARCHIVE_ENTRY_ACL_GROUP: + ae_gid = archive_write_disk_gid(a, ae_name, ae_id); + acl_set_tag_type(acl_entry, ACL_GROUP); + acl_set_qualifier(acl_entry, &ae_gid); + break; + case ARCHIVE_ENTRY_ACL_USER_OBJ: + acl_set_tag_type(acl_entry, ACL_USER_OBJ); + break; + case ARCHIVE_ENTRY_ACL_GROUP_OBJ: + acl_set_tag_type(acl_entry, ACL_GROUP_OBJ); + break; + case ARCHIVE_ENTRY_ACL_MASK: + acl_set_tag_type(acl_entry, ACL_MASK); + break; + case ARCHIVE_ENTRY_ACL_OTHER: + acl_set_tag_type(acl_entry, ACL_OTHER); + break; +#if ARCHIVE_ACL_FREEBSD_NFS4 + case ARCHIVE_ENTRY_ACL_EVERYONE: + acl_set_tag_type(acl_entry, ACL_EVERYONE); + break; +#endif + default: + archive_set_error(a, ARCHIVE_ERRNO_MISC, + "Unsupported ACL tag"); + ret = ARCHIVE_FAILED; + goto exit_free; + } + +#if ARCHIVE_ACL_FREEBSD_NFS4 + r = 0; + switch (ae_type) { + case ARCHIVE_ENTRY_ACL_TYPE_ALLOW: + r = acl_set_entry_type_np(acl_entry, + ACL_ENTRY_TYPE_ALLOW); + break; + case ARCHIVE_ENTRY_ACL_TYPE_DENY: + r = acl_set_entry_type_np(acl_entry, + ACL_ENTRY_TYPE_DENY); + break; + case ARCHIVE_ENTRY_ACL_TYPE_AUDIT: + r = acl_set_entry_type_np(acl_entry, + ACL_ENTRY_TYPE_AUDIT); + break; + case ARCHIVE_ENTRY_ACL_TYPE_ALARM: + r = acl_set_entry_type_np(acl_entry, + ACL_ENTRY_TYPE_ALARM); + break; + case ARCHIVE_ENTRY_ACL_TYPE_ACCESS: + case ARCHIVE_ENTRY_ACL_TYPE_DEFAULT: + // These don't translate directly into the system ACL. + break; + default: + archive_set_error(a, ARCHIVE_ERRNO_MISC, + "Unsupported ACL entry type"); + ret = ARCHIVE_FAILED; + goto exit_free; + } + + if (r != 0) { + archive_set_error(a, errno, + "Failed to set ACL entry type"); + ret = ARCHIVE_FAILED; + goto exit_free; + } +#endif + + if (acl_get_permset(acl_entry, &acl_permset) != 0) { + archive_set_error(a, errno, + "Failed to get ACL permission set"); + ret = ARCHIVE_FAILED; + goto exit_free; + } + if (acl_clear_perms(acl_permset) != 0) { + archive_set_error(a, errno, + "Failed to clear ACL permissions"); + ret = ARCHIVE_FAILED; + goto exit_free; + } +#if ARCHIVE_ACL_FREEBSD_NFS4 + if (ae_requested_type == ARCHIVE_ENTRY_ACL_TYPE_NFS4) { + perm_map_size = acl_nfs4_perm_map_size; + perm_map = acl_nfs4_perm_map; + } else { +#endif + perm_map_size = acl_posix_perm_map_size; + perm_map = acl_posix_perm_map; +#if ARCHIVE_ACL_FREEBSD_NFS4 + } +#endif + + for (i = 0; i < perm_map_size; ++i) { + if (ae_permset & perm_map[i].a_perm) { + if (acl_add_perm(acl_permset, + perm_map[i].p_perm) != 0) { + archive_set_error(a, errno, + "Failed to add ACL permission"); + ret = ARCHIVE_FAILED; + goto exit_free; + } + } + } + +#if ARCHIVE_ACL_FREEBSD_NFS4 + if (ae_requested_type == ARCHIVE_ENTRY_ACL_TYPE_NFS4) { + /* + * acl_get_flagset_np() fails with non-NFSv4 ACLs + */ + if (acl_get_flagset_np(acl_entry, &acl_flagset) != 0) { + archive_set_error(a, errno, + "Failed to get flagset from an NFSv4 " + "ACL entry"); + ret = ARCHIVE_FAILED; + goto exit_free; + } + if (acl_clear_flags_np(acl_flagset) != 0) { + archive_set_error(a, errno, + "Failed to clear flags from an NFSv4 " + "ACL flagset"); + ret = ARCHIVE_FAILED; + goto exit_free; + } + for (i = 0; i < acl_nfs4_flag_map_size; ++i) { + if (ae_permset & acl_nfs4_flag_map[i].a_perm) { + if (acl_add_flag_np(acl_flagset, + acl_nfs4_flag_map[i].p_perm) != 0) { + archive_set_error(a, errno, + "Failed to add flag to " + "NFSv4 ACL flagset"); + ret = ARCHIVE_FAILED; + goto exit_free; + } + } + } + } +#endif + } + + /* Try restoring the ACL through 'fd' if we can. */ + if (fd >= 0) { + if (acl_set_fd_np(fd, acl, acl_type) == 0) + ret = ARCHIVE_OK; + else { + if (errno == EOPNOTSUPP) { + /* Filesystem doesn't support ACLs */ + ret = ARCHIVE_OK; + } else { + archive_set_error(a, errno, + "Failed to set acl on fd: %s", tname); + ret = ARCHIVE_WARN; + } + } + } +#if HAVE_ACL_SET_LINK_NP + else if (acl_set_link_np(name, acl_type, acl) != 0) +#else + /* FreeBSD older than 8.0 */ + else if (acl_set_file(name, acl_type, acl) != 0) +#endif + { + if (errno == EOPNOTSUPP) { + /* Filesystem doesn't support ACLs */ + ret = ARCHIVE_OK; + } else { + archive_set_error(a, errno, "Failed to set acl: %s", + tname); + ret = ARCHIVE_WARN; + } + } +exit_free: + acl_free(acl); + return (ret); +} + +int +archive_read_disk_entry_setup_acls(struct archive_read_disk *a, + struct archive_entry *entry, int *fd) +{ + const char *accpath; + acl_t acl; + int r; + + accpath = NULL; + + if (*fd < 0) { + accpath = archive_read_disk_entry_setup_path(a, entry, fd); + if (accpath == NULL) + return (ARCHIVE_WARN); + } + + archive_entry_acl_clear(entry); + + acl = NULL; + +#if ARCHIVE_ACL_FREEBSD_NFS4 + /* Try NFSv4 ACL first. */ + if (*fd >= 0) + acl = acl_get_fd_np(*fd, ACL_TYPE_NFS4); + else if (!a->follow_symlinks) + acl = acl_get_link_np(accpath, ACL_TYPE_NFS4); + else + acl = acl_get_file(accpath, ACL_TYPE_NFS4); + + /* Ignore "trivial" ACLs that just mirror the file mode. */ + if (acl != NULL && acl_is_trivial_np(acl, &r) == 0 && r == 1) { + acl_free(acl); + acl = NULL; + return (ARCHIVE_OK); + } + + if (acl != NULL) { + r = translate_acl(a, entry, acl, ARCHIVE_ENTRY_ACL_TYPE_NFS4); + acl_free(acl); + acl = NULL; + + if (r != ARCHIVE_OK) { + archive_set_error(&a->archive, errno, + "Couldn't translate NFSv4 ACLs"); + } + + return (r); + } +#endif + + /* Retrieve access ACL from file. */ + if (*fd >= 0) + acl = acl_get_fd_np(*fd, ACL_TYPE_ACCESS); +#if HAVE_ACL_GET_LINK_NP + else if (!a->follow_symlinks) + acl = acl_get_link_np(accpath, ACL_TYPE_ACCESS); +#else + else if ((!a->follow_symlinks) + && (archive_entry_filetype(entry) == AE_IFLNK)) + /* We can't get the ACL of a symlink, so we assume it can't + have one. */ + acl = NULL; +#endif + else + acl = acl_get_file(accpath, ACL_TYPE_ACCESS); + +#if HAVE_ACL_IS_TRIVIAL_NP + /* Ignore "trivial" ACLs that just mirror the file mode. */ + if (acl != NULL && acl_is_trivial_np(acl, &r) == 0 && r == 1) { + acl_free(acl); + acl = NULL; + } +#endif + + if (acl != NULL) { + r = translate_acl(a, entry, acl, ARCHIVE_ENTRY_ACL_TYPE_ACCESS); + acl_free(acl); + acl = NULL; + + if (r != ARCHIVE_OK) { + archive_set_error(&a->archive, errno, + "Couldn't translate access ACLs"); + return (r); + } + } + + /* Only directories can have default ACLs. */ + if (S_ISDIR(archive_entry_mode(entry))) { + if (*fd >= 0) + acl = acl_get_fd_np(*fd, ACL_TYPE_DEFAULT); + else + acl = acl_get_file(accpath, ACL_TYPE_DEFAULT); + if (acl != NULL) { + r = translate_acl(a, entry, acl, + ARCHIVE_ENTRY_ACL_TYPE_DEFAULT); + acl_free(acl); + if (r != ARCHIVE_OK) { + archive_set_error(&a->archive, errno, + "Couldn't translate default ACLs"); + return (r); + } + } + } + return (ARCHIVE_OK); +} + +int +archive_write_disk_set_acls(struct archive *a, int fd, const char *name, + struct archive_acl *abstract_acl, __LA_MODE_T mode) +{ + int ret = ARCHIVE_OK; + + (void)mode; /* UNUSED */ + + if ((archive_acl_types(abstract_acl) + & ARCHIVE_ENTRY_ACL_TYPE_POSIX1E) != 0) { + if ((archive_acl_types(abstract_acl) + & ARCHIVE_ENTRY_ACL_TYPE_ACCESS) != 0) { + ret = set_acl(a, fd, name, abstract_acl, + ARCHIVE_ENTRY_ACL_TYPE_ACCESS, "access"); + if (ret != ARCHIVE_OK) + return (ret); + } + if ((archive_acl_types(abstract_acl) + & ARCHIVE_ENTRY_ACL_TYPE_DEFAULT) != 0) + ret = set_acl(a, fd, name, abstract_acl, + ARCHIVE_ENTRY_ACL_TYPE_DEFAULT, "default"); + + /* Simultaneous POSIX.1e and NFSv4 is not supported */ + return (ret); + } +#if ARCHIVE_ACL_FREEBSD_NFS4 + else if ((archive_acl_types(abstract_acl) & + ARCHIVE_ENTRY_ACL_TYPE_NFS4) != 0) { + ret = set_acl(a, fd, name, abstract_acl, + ARCHIVE_ENTRY_ACL_TYPE_NFS4, "nfs4"); + } +#endif + return (ret); +} +#endif /* ARCHIVE_ACL_FREEBSD */ Modified: stable/10/contrib/libarchive/libarchive/archive_entry.3 ============================================================================== --- stable/10/contrib/libarchive/libarchive/archive_entry.3 Fri Mar 31 20:16:24 2017 (r316337) +++ stable/10/contrib/libarchive/libarchive/archive_entry.3 Fri Mar 31 20:17:30 2017 (r316338) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd Feburary 2, 2012 +.Dd February 2, 2012 .Dt ARCHIVE_ENTRY 3 .Os .Sh NAME Modified: stable/10/contrib/libarchive/libarchive/archive_entry.c ============================================================================== --- stable/10/contrib/libarchive/libarchive/archive_entry.c Fri Mar 31 20:16:24 2017 (r316337) +++ stable/10/contrib/libarchive/libarchive/archive_entry.c Fri Mar 31 20:17:30 2017 (r316338) @@ -1638,7 +1638,7 @@ _archive_entry_acl_text_l(struct archive * SUCH DAMAGE. */ -static struct flag { +static const struct flag { const char *name; const wchar_t *wname; unsigned long set; @@ -1708,6 +1708,9 @@ static struct flag { #ifdef UF_COMPRESSED { "nocompressed",L"nocompressed", UF_COMPRESSED, 0 }, #endif +#ifdef UF_HIDDEN + { "nohidden", L"nohidden", UF_HIDDEN, 0 }, +#endif #if defined(FS_UNRM_FL) { "nouunlink", L"nouunlink", FS_UNRM_FL, 0}, #elif defined(EXT2_UNRM_FL) @@ -1840,7 +1843,7 @@ ae_fflagstostr(unsigned long bitset, uns char *string, *dp; const char *sp; unsigned long bits; - struct flag *flag; + const struct flag *flag; size_t length; bits = bitset | bitclear; @@ -1892,7 +1895,7 @@ static const char * ae_strtofflags(const char *s, unsigned long *setp, unsigned long *clrp) { const char *start, *end; - struct flag *flag; + const struct flag *flag; unsigned long set, clear; const char *failed; @@ -1960,7 +1963,7 @@ static const wchar_t * ae_wcstofflags(const wchar_t *s, unsigned long *setp, unsigned long *clrp) { const wchar_t *start, *end; - struct flag *flag; + const struct flag *flag; unsigned long set, clear; const wchar_t *failed; Modified: stable/10/contrib/libarchive/libarchive/archive_entry_acl.3 ============================================================================== --- stable/10/contrib/libarchive/libarchive/archive_entry_acl.3 Fri Mar 31 20:16:24 2017 (r316337) +++ stable/10/contrib/libarchive/libarchive/archive_entry_acl.3 Fri Mar 31 20:17:30 2017 (r316338) @@ -267,7 +267,7 @@ Only inherit, do not apply the permissio .It Dv ARCHIVE_ENTRY_ACL_ENTRY_NO_PROPAGATE_INHERIT ( Sy n ) Do not propagate inherit flags. Only first-level entries inherit ACLs. .It Dv ARCHIVE_ENTRY_ACL_ENTRY_SUCCESSFUL_ACCESS ( Sy S ) -Trigger alarm or audit on succesful access. +Trigger alarm or audit on successful access. .It Dv ARCHIVE_ENTRY_ACL_ENTRY_FAILED_ACCESS ( Sy F ) Trigger alarm or audit on failed access. .It Dv ARCHIVE_ENTRY_ACL_ENTRY_INHERITED ( Sy I ) @@ -279,7 +279,7 @@ and .Fn archive_entry_acl_add_entry_w add a single ACL entry. For the access ACL and non-extended principals, the classic Unix permissions -are updated. An archive enry cannot contain both POSIX.1e and NFSv4 ACL +are updated. An archive entry cannot contain both POSIX.1e and NFSv4 ACL entries. .Pp .Fn archive_entry_acl_clear @@ -303,7 +303,7 @@ for POSIX.1e ACLs and for NFSv4 ACLs. For POSIX.1e ACLs if .Dv ARCHIVE_ENTRY_ACL_TYPE_ACCESS is included and at least one extended ACL entry is found, -the three non-extened ACLs are added. +the three non-extended ACLs are added. .Pp .Fn archive_entry_acl_from_text and @@ -367,7 +367,7 @@ and .Fn archive_entry_acl_to_text_w convert the ACL entries for the given type into a .Pq wide -string of ACL entries separated by newline. If the the pointer +string of ACL entries separated by newline. If the pointer .Fa len_p is not NULL, then the function shall return the length of the string .Pq not including the NULL terminator Modified: stable/10/contrib/libarchive/libarchive/archive_getdate.c ============================================================================== --- stable/10/contrib/libarchive/libarchive/archive_getdate.c Fri Mar 31 20:16:24 2017 (r316337) +++ stable/10/contrib/libarchive/libarchive/archive_getdate.c Fri Mar 31 20:17:30 2017 (r316338) @@ -691,7 +691,7 @@ Convert(time_t Month, time_t Day, time_t time_t Hours, time_t Minutes, time_t Seconds, time_t Timezone, enum DSTMODE DSTmode) { - static int DaysInMonth[12] = { + int DaysInMonth[12] = { 31, 0, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }; time_t Julian; Modified: stable/10/contrib/libarchive/libarchive/archive_pack_dev.c ============================================================================== --- stable/10/contrib/libarchive/libarchive/archive_pack_dev.c Fri Mar 31 20:16:24 2017 (r316337) +++ stable/10/contrib/libarchive/libarchive/archive_pack_dev.c Fri Mar 31 20:17:30 2017 (r316338) @@ -280,7 +280,7 @@ pack_bsdos(int n, unsigned long numbers[ /* list of formats and pack functions */ /* this list must be sorted lexically */ -static struct format { +static const struct format { const char *name; pack_t *pack; } formats[] = { Modified: stable/10/contrib/libarchive/libarchive/archive_platform.h ============================================================================== --- stable/10/contrib/libarchive/libarchive/archive_platform.h Fri Mar 31 20:16:24 2017 (r316337) +++ stable/10/contrib/libarchive/libarchive/archive_platform.h Fri Mar 31 20:17:30 2017 (r316338) @@ -143,40 +143,6 @@ #endif /* - * If this platform has , acl_create(), acl_init(), - * acl_set_file(), and ACL_USER, we assume it has the rest of the - * POSIX.1e draft functions used in archive_read_extract.c. - */ -#if HAVE_SYS_ACL_H && HAVE_ACL_CREATE_ENTRY && HAVE_ACL_INIT && HAVE_ACL_SET_FILE -#if HAVE_DECL_ACL_USER -#define HAVE_POSIX_ACL 1 -#elif HAVE_DECL_ACL_TYPE_EXTENDED && HAVE_MEMBERSHIP_H -#define HAVE_DARWIN_ACL 1 -#endif -#if HAVE_DECL_ACL_TYPE_NFS4 -#define HAVE_FREEBSD_NFS4_ACL 1 -#endif -#endif - -/* - * If this platform has , acl(), facl() and ACLENT_T - * facl_set() and types aclent_t and ace_t it uses Solaris-style ACL functions - */ -#if HAVE_SYS_ACL_H && HAVE_ACL && HAVE_FACL && HAVE_ACLENT_T && \ - HAVE_DECL_GETACL && HAVE_DECL_GETACLCNT && HAVE_DECL_SETACL -#define HAVE_SUN_ACL 1 -#if HAVE_ACE_T && HAVE_DECL_ACE_GETACL && HAVE_DECL_ACE_GETACLCNT && \ - HAVE_DECL_ACE_SETACL -#define HAVE_SUN_NFS4_ACL 1 -#endif -#endif - -/* Define if platform supports NFSv4 ACLs */ -#if HAVE_FREEBSD_NFS4_ACL || HAVE_SUN_NFS4_ACL || HAVE_DARWIN_ACL -#define HAVE_NFS4_ACL 1 -#endif - -/* * If we can't restore metadata using a file descriptor, then * for compatibility's sake, close files before trying to restore metadata. */ Copied: stable/10/contrib/libarchive/libarchive/archive_platform_acl.h (from r315636, head/contrib/libarchive/libarchive/archive_platform_acl.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/contrib/libarchive/libarchive/archive_platform_acl.h Fri Mar 31 20:17:30 2017 (r316338, copy of r315636, head/contrib/libarchive/libarchive/archive_platform_acl.h) @@ -0,0 +1,49 @@ +/*- + * Copyright (c) 2017 Martin Matuska + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable-10@freebsd.org Sat Apr 1 09:29:48 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C56CCD267AE; Sat, 1 Apr 2017 09:29:48 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 86E79FA7; Sat, 1 Apr 2017 09:29:48 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v319TlNp059403; Sat, 1 Apr 2017 09:29:47 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v319Tlr0059401; Sat, 1 Apr 2017 09:29:47 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201704010929.v319Tlr0059401@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 1 Apr 2017 09:29:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r316348 - in stable/10/usr.sbin/pw: . tests X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Apr 2017 09:29:48 -0000 Author: bapt Date: Sat Apr 1 09:29:47 2017 New Revision: 316348 URL: https://svnweb.freebsd.org/changeset/base/316348 Log: MFC: r315912 (by eugen@) and r315935 Properly initialise with content of pw.conf(5) that was mistakenly ignored. Also, respect "defaultgroup" if specified there. Add a regression test PR: 217934 Submitted by: Victor Sudakov Modified: stable/10/usr.sbin/pw/pw_user.c stable/10/usr.sbin/pw/tests/pw_useradd_test.sh Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/pw/pw_user.c ============================================================================== --- stable/10/usr.sbin/pw/pw_user.c Sat Apr 1 09:27:00 2017 (r316347) +++ stable/10/usr.sbin/pw/pw_user.c Sat Apr 1 09:29:47 2017 (r316348) @@ -1179,7 +1179,7 @@ pw_user_add(int argc, char **argv, char char line[_PASSWORD_LEN+1], path[MAXPATHLEN]; char *gecos, *homedir, *skel, *walk, *userid, *groupid, *grname; char *default_passwd, *name, *p; - const char *cfg; + const char *cfg = NULL; login_cap_t *lc; FILE *pfp, *fp; intmax_t id = -1; @@ -1358,6 +1358,9 @@ pw_user_add(int argc, char **argv, char if (GETPWNAM(name) != NULL) errx(EX_DATAERR, "login name `%s' already exists", name); + if (!grname) + grname = cmdcnf->default_group; + pwd = &fakeuser; pwd->pw_name = name; pwd->pw_class = cmdcnf->default_class ? cmdcnf->default_class : ""; @@ -1487,7 +1490,7 @@ pw_user_mod(int argc, char **argv, char struct group *grp; StringList *groups = NULL; char args[] = "C:qn:u:c:d:e:p:g:G:mM:l:k:s:w:L:h:H:NPYy:"; - const char *cfg; + const char *cfg = NULL; char *gecos, *homedir, *grname, *name, *newname, *walk, *skel, *shell; char *passwd, *class, *nispasswd; login_cap_t *lc; Modified: stable/10/usr.sbin/pw/tests/pw_useradd_test.sh ============================================================================== --- stable/10/usr.sbin/pw/tests/pw_useradd_test.sh Sat Apr 1 09:27:00 2017 (r316347) +++ stable/10/usr.sbin/pw/tests/pw_useradd_test.sh Sat Apr 1 09:29:47 2017 (r316348) @@ -384,6 +384,19 @@ user_add_with_pw_conf_body() atf_check -s exit:0 \ ${PW} useradd foo -C ${HOME}/pw.conf } +atf_test_case user_add_defaultgroup +user_add_defaultgroup_body() +{ + populate_etc_skel + echo 'defaultgroup = "plop"' > ${HOME}/pw.conf + atf_check -s exit:0 \ + ${PW} groupadd plop -g 442 + atf_check -s exit:0 \ + ${PW} useradd foo -C ${HOME}/pw.conf + atf_check -s exit:0 \ + -o inline:"foo:*:1001:442::0:0:User &:/home/foo:/bin/sh\n" \ + ${PW} usershow foo +} atf_init_test_cases() { atf_add_test_case user_add @@ -419,4 +432,5 @@ atf_init_test_cases() { atf_add_test_case user_add_w_random atf_add_test_case user_add_w_yes atf_add_test_case user_add_with_pw_conf + atf_add_test_case user_add_defaultgroup } From owner-svn-src-stable-10@freebsd.org Sat Apr 1 09:32:07 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 21718D26A6A; Sat, 1 Apr 2017 09:32:07 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B9EA379B; Sat, 1 Apr 2017 09:32:06 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v319W5uW063230; Sat, 1 Apr 2017 09:32:05 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v319W5gb063223; Sat, 1 Apr 2017 09:32:05 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201704010932.v319W5gb063223@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 1 Apr 2017 09:32:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r316350 - stable/10/contrib/tzdata X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Apr 2017 09:32:07 -0000 Author: bapt Date: Sat Apr 1 09:32:05 2017 New Revision: 316350 URL: https://svnweb.freebsd.org/changeset/base/316350 Log: MFC r316060: Import tzdata 2017b Modified: stable/10/contrib/tzdata/Makefile stable/10/contrib/tzdata/NEWS stable/10/contrib/tzdata/Theory stable/10/contrib/tzdata/africa stable/10/contrib/tzdata/antarctica stable/10/contrib/tzdata/asia stable/10/contrib/tzdata/australasia stable/10/contrib/tzdata/backward stable/10/contrib/tzdata/backzone stable/10/contrib/tzdata/europe stable/10/contrib/tzdata/leap-seconds.list stable/10/contrib/tzdata/leapseconds stable/10/contrib/tzdata/northamerica stable/10/contrib/tzdata/southamerica stable/10/contrib/tzdata/version stable/10/contrib/tzdata/zone.tab stable/10/contrib/tzdata/zone1970.tab Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/tzdata/Makefile ============================================================================== --- stable/10/contrib/tzdata/Makefile Sat Apr 1 09:31:20 2017 (r316349) +++ stable/10/contrib/tzdata/Makefile Sat Apr 1 09:32:05 2017 (r316350) @@ -72,11 +72,11 @@ MANDIR= $(TOPDIR)/man LIBDIR= $(TOPDIR)/lib -# If you always want time values interpreted as "seconds since the epoch -# (not counting leap seconds)", use +# If you want only POSIX time, with time values interpreted as +# seconds since the epoch (not counting leap seconds), use # REDO= posix_only -# below. If you always want right time values interpreted as "seconds since -# the epoch" (counting leap seconds)", use +# below. If you want want only "right" time, with values interpreted +# as seconds since the epoch (counting leap seconds), use # REDO= right_only # below. If you want both sets of data available, with leap seconds not # counted normally, use @@ -85,7 +85,10 @@ LIBDIR= $(TOPDIR)/lib # normally, use # REDO= right_posix # below. POSIX mandates that leap seconds not be counted; for compatibility -# with it, use "posix_only" or "posix_right". +# with it, use "posix_only" or "posix_right". Use POSIX time on systems with +# leap smearing; this can work better than unsmeared "right" time with +# applications that are not leap second aware, and is closer to unsmeared +# "right" time than unsmeared POSIX time is (e.g., 0.5 vs 1.0 s max error). REDO= posix_right @@ -165,7 +168,7 @@ GCC_DEBUG_FLAGS = -Dlint -g3 -O3 -fno-co -Wshadow -Wstrict-prototypes -Wsuggest-attribute=const \ -Wsuggest-attribute=format -Wsuggest-attribute=noreturn \ -Wsuggest-attribute=pure -Wtrampolines \ - -Wunused -Wwrite-strings \ + -Wundef -Wunused -Wwrite-strings \ -Wno-address -Wno-format-nonliteral -Wno-sign-compare \ -Wno-type-limits -Wno-unused-parameter # Modified: stable/10/contrib/tzdata/NEWS ============================================================================== --- stable/10/contrib/tzdata/NEWS Sat Apr 1 09:31:20 2017 (r316349) +++ stable/10/contrib/tzdata/NEWS Sat Apr 1 09:32:05 2017 (r316350) @@ -1,5 +1,129 @@ News for the tz database +Release 2017b - 2017-03-17 07:30:38 -0700 + + Briefly: Haiti has resumed DST. + + Changes to past and future time stamps + + Haiti resumed observance of DST in 2017. (Thanks to Steffen Thorsen.) + + Changes to past time stamps + + Liberia changed from -004430 to +00 on 1972-01-07, not 1972-05-01. + + Use "MMT" to abbreviate Liberia's time zone before 1972, as "-004430" + is one byte over the POSIX limit. (Problem reported by Derick Rethans.) + + +Release 2017a - 2017-02-28 00:05:36 -0800 + + Briefly: Southern Chile moves from -04/-03 to -03, and Mongolia + discontinues DST. + + Changes to future time stamps + + Mongolia no longer observes DST. (Thanks to Ganbold Tsagaankhuu.) + + Chile's Region of Magallanes moves from -04/-03 to -03 year-round. + Its clocks diverge from America/Santiago starting 2017-05-13 at + 23:00, hiving off a new zone America/Punta_Arenas. Although the + Chilean government says this change expires in May 2019, for now + assume it's permanent. (Thanks to Juan Correa and Deborah + Goldsmith.) This also affects Antarctica/Palmer. + + Changes to past time stamps + + Fix many entries for historical time stamps for Europe/Madrid + before 1979, to agree with tables compiled by Pere Planesas of the + National Astronomical Observatory of Spain. As a side effect, + this changes some time stamps for Africa/Ceuta before 1929, which + are probably guesswork anyway. (Thanks to Steve Allen and + Pierpaolo Bernardi for the heads-ups, and to Michael Deckers for + correcting the 1901 transition.) + + Ecuador observed DST from 1992-11-28 to 1993-02-05. + (Thanks to Alois Treindl.) + + Asia/Atyrau and Asia/Oral were at +03 (not +04) before 1930-06-21. + (Thanks to Stepan Golosunov.) + + Changes to past and future time zone abbreviations + + Switch to numeric time zone abbreviations for South America, as + part of the ongoing project of removing invented abbreviations. + This avoids the need to invent an abbreviation for the new Chilean + new zone. Similarly, switch from invented to numeric time zone + abbreviations for Afghanistan, American Samoa, the Azores, + Bangladesh, Bhutan, the British Indian Ocean Territory, Brunei, + Cape Verde, Chatham Is, Christmas I, Cocos (Keeling) Is, Cook Is, + Dubai, East Timor, Eucla, Fiji, French Polynesia, Greenland, + Indochina, Iran, Iraq, Kiribati, Lord Howe, Macquarie, Malaysia, + the Maldives, Marshall Is, Mauritius, Micronesia, Mongolia, + Myanmar, Nauru, Nepal, New Caledonia, Niue, Norfolk I, Palau, + Papua New Guinea, the Philippines, Pitcairn, Qatar, Réunion, St + Pierre & Miquelon, Samoa, Saudi Arabia, Seychelles, Singapore, + Solomon Is, Tokelau, Tuvalu, Wake, Vanuatu, Wallis & Futuna, and + Xinjiang; for 20-minute daylight saving time in Ghana before 1943; + for half-hour daylight saving time in Belize before 1944 and in + the Dominican Republic before 1975; and for Canary Islands before + 1946, for Guinea-Bissau before 1975, for Iceland before 1969, for + Indian Summer Time before 1942, for Indonesia before around 1964, + for Kenya before 1960, for Liberia before 1973, for Madeira before + 1967, for Namibia before 1943, for the Netherlands in 1937-9, for + Pakistan before 1971, for Western Sahara before 1977, and for + Zaporozhye in 1880-1924. + + For Alaska time from 1900 through 1967, instead of "CAT" use the + abbreviation "AST", the abbreviation commonly used at the time + (Atlantic Standard Time had not been standardized yet). Use "AWT" + and "APT" instead of the invented abbreviations "CAWT" and "CAPT". + + Use "CST" and "CDT" instead of invented abbreviations for Macau + before 1999 and Taiwan before 1938, and use "JST" instead of the + invented abbreviation "JCST" for Japan and Korea before 1938. + + Change to database entry category + + Move the Pacific/Johnston link from 'australasia' to 'backward', + since Johnston is now uninhabited. + + Changes to code + + zic no longer mishandles some transitions in January 2038 when it + attempts to work around Qt bug 53071. This fixes a bug affecting + Pacific/Tongatapu that was introduced in zic 2016e. localtime.c + now contains a workaround, useful when loading a file generated by + a buggy zic. (Problem and localtime.c fix reported by Bradley + White.) + + zdump -i now outputs non-hour numeric time zone abbreviations + without a colon, e.g., "+0530" rather than "+05:30". This agrees + with zic %z and with common practice, and simplifies auditing of + zdump output. + + zdump is now buildable again with -DUSE_LTZ=0. + (Problem reported by Joseph Myers.) + + zdump.c now always includes private.h, to avoid code duplication + with private.h. (Problem reported by Kees Dekker.) + + localtime.c no longer mishandles early or late timestamps + when TZ is set to a POSIX-style string that specifies DST. + (Problem reported by Kees Dekker.) + + date and strftime now cause %z to generate "-0000" instead of + "+0000" when the UT offset is zero and the time zone abbreviation + begins with "-". + + Changes to documentation and commentary + + The 'Theory' file now better documents choice of historical time + zone abbreviations. (Problems reported by Michael Deckers.) + + tz-link.htm now covers leap smearing, which is popular in clouds. + + Release 2016j - 2016-11-22 23:17:13 -0800 Briefly: Saratov, Russia moves from +03 to +04 on 2016-12-04. @@ -13,7 +137,7 @@ Release 2016j - 2016-11-22 23:17:13 -080 Changes to past time stamps The new zone Asia/Atyrau for AtyraÅ« Region, Kazakhstan, is like - Asia/Aqtau except it switched from +04/+05 to +05/+06 in spring + Asia/Aqtau except it switched from +05/+06 to +04/+05 in spring 1999, not fall 1994. (Thanks to Stepan Golosunov.) Changes to past time zone abbreviations @@ -911,16 +1035,16 @@ Release 2014i - 2014-10-21 22:04:57 -070 been fixed. (Thanks to Christos Zoulas for reporting most of these problems and for suggesting fixes.) - If USG_COMPAT is defined and the requested time stamp is standard time, + If USG_COMPAT is defined and the requested timestamp is standard time, the tz library's localtime and mktime functions now set the extern - variable timezone to a value appropriate for that time stamp; and + variable timezone to a value appropriate for that timestamp; and similarly for ALTZONE, daylight saving time, and the altzone variable. This change is a companion to the tzname change in 2014h, and is designed to make timezone and altzone more compatible with tzname. The tz library's functions now set errno to EOVERFLOW if they fail because the result cannot be represented. ctime and ctime_r now - return NULL and set errno when a time stamp is out of range, rather + return NULL and set errno when a timestamp is out of range, rather than having undefined behavior. Some bugs associated with the new 2014g functions have been fixed. @@ -937,7 +1061,7 @@ Release 2014i - 2014-10-21 22:04:57 -070 Release 2014h - 2014-09-25 18:59:03 -0700 - Changes affecting past time stamps + Changes affecting past timestamps America/Jamaica's 1974 spring-forward transition was Jan. 6, not Apr. 28. @@ -945,8 +1069,8 @@ Release 2014h - 2014-09-25 18:59:03 -070 not 1920-01-06. The old entry was based on a misinterpretation of Shanks. Some more zones have been turned into links, when they differed - from existing zones only for older time stamps. As usual, - these changes affect UTC offsets in pre-1970 time stamps only. + from existing zones only for older timestamps. As usual, + these changes affect UTC offsets in pre-1970 timestamps only. Their old contents have been moved to the 'backzone' file. The affected zones are: Africa/Blantyre, Africa/Bujumbura, Africa/Gaborone, Africa/Harare, Africa/Kigali, Africa/Lubumbashi, @@ -958,7 +1082,7 @@ Release 2014h - 2014-09-25 18:59:03 -070 not merely on platforms defining TM_GMTOFF. The tz library's localtime and mktime functions now set tzname to a value - appropriate for the requested time stamp, and zdump now uses this + appropriate for the requested timestamp, and zdump now uses this on platforms not defining TM_ZONE, fixing a 2014g regression. (Thanks to Tim Parenti for reporting the problem.) @@ -998,13 +1122,13 @@ Release 2014h - 2014-09-25 18:59:03 -070 Release 2014g - 2014-08-28 12:31:23 -0700 - Changes affecting future time stamps + Changes affecting future timestamps Turks & Caicos is switching from US eastern time to UT -04 year-round, modeled as a switch on 2014-11-02 at 02:00. [As noted in 2014j, this switch was later delayed.] - Changes affecting past time stamps + Changes affecting past timestamps Time in Russia or the USSR before 1926 or so has been corrected by a few seconds in the following zones: Asia/Irkutsk, @@ -1014,7 +1138,7 @@ Release 2014g - 2014-08-28 12:31:23 -070 Vladimir Karpinsky.) The Portuguese decree of 1911-05-26 took effect on 1912-01-01. - This affects 1911 time stamps in Africa/Bissau, Africa/Luanda, + This affects 1911 timestamps in Africa/Bissau, Africa/Luanda, Atlantic/Azores, and Atlantic/Madeira. Also, Lisbon's pre-1912 GMT offset was -0:36:45 (rounded from -0:36:44.68), not -0:36:32. (Thanks to Stephen Colebourne for pointing to the decree.) @@ -1022,7 +1146,7 @@ Release 2014g - 2014-08-28 12:31:23 -070 Asia/Dhaka ended DST on 2009-12-31 at 24:00, not 23:59. A new file 'backzone' contains data which may appeal to - connoisseurs of old time stamps, although it is out of scope for + connoisseurs of old timestamps, although it is out of scope for the tz database, is often poorly sourced, and contains some data that is known to be incorrect. The new file is not recommended for ordinary use and its entries are not installed by default. @@ -1030,8 +1154,8 @@ Release 2014g - 2014-08-28 12:31:23 -070 Isle of Man entries.) Some more zones have been turned into links, when they differed - from existing zones only for older time stamps. As usual, - these changes affect UTC offsets in pre-1970 time stamps only. + from existing zones only for older timestamps. As usual, + these changes affect UTC offsets in pre-1970 timestamps only. Their old contents have been moved to the 'backzone' file. The affected zones are: Africa/Bangui, Africa/Brazzaville, Africa/Douala, Africa/Kinshasa, Africa/Libreville, Africa/Luanda, @@ -1082,7 +1206,7 @@ Release 2014g - 2014-08-28 12:31:23 -070 but does not cause other problems such as traps. If TM_GMTOFF is defined and UNINIT_TRAP is 0, mktime is now - more likely to guess right for ambiguous time stamps near + more likely to guess right for ambiguous timestamps near transitions where tm_isdst does not change. If HAVE_STRFTIME_L is defined to 1, the tz library now defines @@ -1155,7 +1279,7 @@ Release 2014g - 2014-08-28 12:31:23 -070 Release 2014f - 2014-08-05 17:42:36 -0700 - Changes affecting future time stamps + Changes affecting future timestamps Russia will subtract an hour from most of its time zones on 2014-10-26 at 02:00 local time. (Thanks to Alexander Krivenyshev.) @@ -1206,20 +1330,20 @@ Release 2014f - 2014-08-05 17:42:36 -070 These abbreviations are now used for time in Korea, Taiwan, and Sakhalin while controlled by Japan. - Changes affecting past time stamps + Changes affecting past timestamps China's five zones have been simplified to two, since the post-1970 differences in the other three seem to have been imaginary. The zones Asia/Harbin, Asia/Chongqing, and Asia/Kashgar have been removed; backwards-compatibility links still work, albeit with - different behaviors for time stamps before May 1980. Asia/Urumqi's + different behaviors for timestamps before May 1980. Asia/Urumqi's 1980 transition to UT +08 has been removed, so that it is now at +06 and not +08. (Thanks to Luther Ma and to Alois Treindl; Treindl sent helpful translations of two papers by Guo Qingsheng.) Some zones have been turned into links, when they differed from existing zones only for older UTC offsets where data entries were likely invented. - These changes affect UTC offsets in pre-1970 time stamps only. This is + These changes affect UTC offsets in pre-1970 timestamps only. This is similar to the change in release 2013e, except this time for western Africa. The affected zones are: Africa/Bamako, Africa/Banjul, Africa/Conakry, Africa/Dakar, Africa/Freetown, Africa/Lome, @@ -1364,7 +1488,7 @@ Release 2014f - 2014-08-05 17:42:36 -070 Release 2014e - 2014-06-12 21:53:52 -0700 - Changes affecting near-future time stamps + Changes affecting near-future timestamps Egypt's 2014 Ramadan-based transitions are June 26 and July 31 at 24:00. (Thanks to Imed Chihi.) Guess that from 2015 on Egypt will temporarily @@ -1376,7 +1500,7 @@ Release 2014e - 2014-06-12 21:53:52 -070 temporarily switch to standard time at 03:00 the last Saturday before Ramadan, and back to DST at 02:00 the first Saturday after Ramadan. - Changes affecting past time stamps + Changes affecting past timestamps The abbreviation "MSM" (Moscow Midsummer Time) is now used instead of "MSD" for Moscow's double daylight time in summer 1921. Also, a typo @@ -1394,7 +1518,7 @@ Release 2014d - 2014-05-27 21:34:40 -070 Changes affecting code - zic no longer generates files containing time stamps before the Big Bang. + zic no longer generates files containing timestamps before the Big Bang. This works around GNOME bug 730332 . (Thanks to Leonardo Chiquitto for reporting the bug, and to @@ -1407,7 +1531,7 @@ Release 2014d - 2014-05-27 21:34:40 -070 Release 2014c - 2014-05-13 07:44:13 -0700 - Changes affecting near-future time stamps + Changes affecting near-future timestamps Egypt observes DST starting 2014-05-15 at 24:00. (Thanks to Ahmad El-Dardiry and Gunther Vermier.) @@ -1421,7 +1545,7 @@ Release 2014c - 2014-05-13 07:44:13 -070 Changes affecting code zic now generates transitions for minimum time values, eliminating guesswork - when handling low-valued time stamps. (Thanks to Arthur David Olson.) + when handling low-valued timestamps. (Thanks to Arthur David Olson.) Port to Cygwin sans glibc. (Thanks to Arthur David Olson.) @@ -1432,7 +1556,7 @@ Release 2014c - 2014-05-13 07:44:13 -070 Release 2014b - 2014-03-24 21:28:50 -0700 - Changes affecting near-future time stamps + Changes affecting near-future timestamps Crimea switches to Moscow time on 2014-03-30 at 02:00 local time. (Thanks to Alexander Krivenyshev.) Move its zone.tab entry from UA to RU. @@ -1471,12 +1595,12 @@ Release 2014b - 2014-03-24 21:28:50 -070 Release 2014a - 2014-03-07 23:30:29 -0800 - Changes affecting near-future time stamps + Changes affecting near-future timestamps Turkey begins DST on 2014-03-31, not 03-30. (Thanks to Faruk Pasin for the heads-up, and to Tim Parenti for simplifying the update.) - Changes affecting past time stamps + Changes affecting past timestamps Fiji ended DST on 2014-01-19 at 02:00, not the previously-scheduled 03:00. (Thanks to Steffen Thorsen.) @@ -1540,13 +1664,13 @@ Release 2014a - 2014-03-07 23:30:29 -080 Release 2013i - 2013-12-17 07:25:23 -0800 - Changes affecting near-future time stamps: + Changes affecting near-future timestamps: Jordan switches back to standard time at 00:00 on December 20, 2013. The 2006-2011 transition schedule is planned to resume in 2014. (Thanks to Steffen Thorsen.) - Changes affecting past time stamps: + Changes affecting past timestamps: In 2004, Cuba began DST on March 28, not April 4. (Thanks to Steffen Thorsen.) @@ -1570,7 +1694,7 @@ Release 2013i - 2013-12-17 07:25:23 -080 Release 2013h - 2013-10-25 15:32:32 -0700 - Changes affecting current and future time stamps: + Changes affecting current and future timestamps: Libya has switched its UT offset back to +02 without DST, instead of +01 with DST. (Thanks to Even Scharning.) @@ -1578,7 +1702,7 @@ Release 2013h - 2013-10-25 15:32:32 -070 Western Sahara (Africa/El_Aaiun) uses Morocco's DST rules. (Thanks to Gwillim Law.) - Changes affecting future time stamps: + Changes affecting future timestamps: Acre and (we guess) western Amazonas will switch from UT -04 to -05 on 2013-11-10. This affects America/Rio_Branco and America/Eirunepe. @@ -1629,7 +1753,7 @@ Release 2013h - 2013-10-25 15:32:32 -070 Release 2013g - 2013-09-30 21:08:26 -0700 - Changes affecting current and near-future time stamps + Changes affecting current and near-future timestamps Morocco now observes DST from the last Sunday in March to the last Sunday in October, not April to September respectively. (Thanks @@ -1662,7 +1786,7 @@ Release 2013g - 2013-09-30 21:08:26 -070 Release 2013f - 2013-09-24 23:37:36 -0700 - Changes affecting near-future time stamps + Changes affecting near-future timestamps Tocantins will very likely not observe DST starting this spring. (Thanks to Steffen Thorsen.) @@ -1709,7 +1833,7 @@ Release 2013f - 2013-09-24 23:37:36 -070 Release 2013e - 2013-09-19 23:50:04 -0700 - Changes affecting near-future time stamps + Changes affecting near-future timestamps This year Fiji will start DST on October 27, not October 20. (Thanks to David Wheeler for the heads-up.) For now, guess that @@ -1727,13 +1851,13 @@ Release 2013e - 2013-09-19 23:50:04 -070 Use ART (UT -03, standard time), rather than WARST (also -03, but daylight saving time) for San Luis, Argentina since 2009. - Changes affecting GodthÃ¥b time stamps after 2037 if version mismatch + Changes affecting GodthÃ¥b timestamps after 2037 if version mismatch Allow POSIX-like TZ strings where the transition time's hour can range from -167 through 167, instead of the POSIX-required 0 through 24. E.g., TZ='FJT-12FJST,M10.3.1/146,M1.3.4/75' for the new Fiji rules. This is a more-compact way to represent - far-future time stamps for America/Godthab, America/Santiago, + far-future timestamps for America/Godthab, America/Santiago, Antarctica/Palmer, Asia/Gaza, Asia/Hebron, Asia/Jerusalem, Pacific/Easter, and Pacific/Fiji. Other zones are unaffected by this change. (Derived from a suggestion by Arthur David Olson.) @@ -1751,12 +1875,12 @@ Release 2013e - 2013-09-19 23:50:04 -070 embedded TZ-format string, and the tz file format version number has therefore been increased from 2 to 3 as a precaution. Version-2-based client code should continue to work as before for - all time stamps before 2038. Existing version-2-based client code + all timestamps before 2038. Existing version-2-based client code (tzcode, GNU/Linux, Solaris) has been tested on version-3-format - files, and typically works in practice even for time stamps after + files, and typically works in practice even for timestamps after 2037; the only known exception is America/Godthab. - Changes affecting time stamps before 1970 + Changes affecting timestamps before 1970 Pacific/Johnston is now a link to Pacific/Honolulu. This corrects some errors before 1947. @@ -1764,7 +1888,7 @@ Release 2013e - 2013-09-19 23:50:04 -070 Some zones have been turned into links, when they differ from existing zones only in older data entries that were likely invented or that differ only in LMT or transitions from LMT. These changes affect - only time stamps before 1943. The affected zones are: + only timestamps before 1943. The affected zones are: Africa/Juba, America/Anguilla, America/Aruba, America/Dominica, America/Grenada, America/Guadeloupe, America/Marigot, America/Montserrat, America/St_Barthelemy, America/St_Kitts, @@ -1774,11 +1898,11 @@ Release 2013e - 2013-09-19 23:50:04 -070 link is better for WWII-era times.) Change Kingston Mean Time from -5:07:12 to -5:07:11. This affects - America/Cayman, America/Jamaica and America/Grand_Turk time stamps + America/Cayman, America/Jamaica and America/Grand_Turk timestamps from 1890 to 1912. Change the UT offset of Bern Mean Time from 0:29:44 to 0:29:46. - This affects Europe/Zurich time stamps from 1853 to 1894. (Thanks + This affects Europe/Zurich timestamps from 1853 to 1894. (Thanks to Alois Treindl). Change the date of the circa-1850 Zurich transition from 1849-09-12 @@ -1796,7 +1920,7 @@ Release 2013e - 2013-09-19 23:50:04 -070 data can't be summarized using a TZ string, and uses a 402-year window rather than a 400-year window. For the current data, this affects only the Asia/Tehran file. It does not affect any of the - time stamps that this file represents, so zdump outputs the same + timestamps that this file represents, so zdump outputs the same information as before. (Thanks to Andrew Main (Zefram).) The 'date' command has a new '-r' option, which lets you specify @@ -1828,7 +1952,7 @@ Release 2013e - 2013-09-19 23:50:04 -070 Changes affecting the zdump utility zdump now outputs "UT" when referring to Universal Time, not "UTC". - "UTC" does not make sense for time stamps that predate the introduction + "UTC" does not make sense for timestamps that predate the introduction of UTC, whereas "UT", a more-generic term, does. (Thanks to Steve Allen for clarifying UT vs UTC.) @@ -1839,7 +1963,7 @@ Release 2013e - 2013-09-19 23:50:04 -070 Remove from zone.tab the names America/Montreal, America/Shiprock, and Antarctica/South_Pole, as they are equivalent to existing - same-country-code zones for post-1970 time stamps. The data entries for + same-country-code zones for post-1970 timestamps. The data entries for these names are unchanged, so the names continue to work as before. Changes affecting code internals @@ -1899,7 +2023,7 @@ Release 2013e - 2013-09-19 23:50:04 -070 There is a new section about the accuracy of the tz database, describing the many ways that errors can creep in, and - explaining why so many of the pre-1970 time stamps are wrong or + explaining why so many of the pre-1970 timestamps are wrong or misleading (thanks to Steve Allen, Lester Caine, and Garrett Wollman for discussions that contributed to this). @@ -1934,7 +2058,7 @@ Release 2013e - 2013-09-19 23:50:04 -070 Release 2013d - 2013-07-05 07:38:01 -0700 - Changes affecting future time stamps: + Changes affecting future timestamps: Morocco's midsummer transitions this year are July 7 and August 10, not July 9 and August 8. (Thanks to Andrew Paprocki.) @@ -1942,7 +2066,7 @@ Release 2013d - 2013-07-05 07:38:01 -070 Israel now falls back on the last Sunday of October. (Thanks to Ephraim Silverberg.) - Changes affecting past time stamps: + Changes affecting past timestamps: Specify Jerusalem's location more precisely; this changes the pre-1880 times by 2 s. @@ -1980,7 +2104,7 @@ Release 2013d - 2013-07-05 07:38:01 -070 Release 2013c - 2013-04-19 16:17:40 -0700 - Changes affecting current and future time stamps: + Changes affecting current and future timestamps: Palestine observed DST starting March 29, 2013. (Thanks to Steffen Thorsen.) From 2013 on, Gaza and Hebron both observe DST, @@ -1991,7 +2115,7 @@ Release 2013c - 2013-04-19 16:17:40 -070 by moving the end of DST to the 4th Sunday in March every year. (Thanks to Carlos Raúl Perasso.) - Changes affecting past time stamps: + Changes affecting past timestamps: Fix some historical data for Palestine to agree with that of timeanddate.com, as follows: @@ -2025,10 +2149,10 @@ Release 2013c - 2013-04-19 16:17:40 -070 Release 2013b - 2013-03-10 22:33:40 -0700 - Changes affecting current and future time stamps: + Changes affecting current and future timestamps: Haiti uses US daylight-saving rules this year, and presumably future years. - This changes time stamps starting today. (Thanks to Steffen Thorsen.) + This changes timestamps starting today. (Thanks to Steffen Thorsen.) Paraguay will end DST on March 24 this year. (Thanks to Steffen Thorsen.) For now, assume it's just this year. @@ -2052,7 +2176,7 @@ Release 2013a - 2013-02-27 09:20:35 -080 The zone offset at the end of version-2-format zone files is now allowed to be 24:00, as per POSIX.1-2008. (Thanks to Arthur David Olson.) - Changes affecting current and future time stamps: + Changes affecting current and future timestamps: Chile's 2013 rules, and we guess rules for 2014 and later, will be the same as 2012, namely Apr Sun>=23 03:00 UTC to Sep Sun>=2 04:00 UTC. @@ -2061,7 +2185,7 @@ Release 2013a - 2013-02-27 09:20:35 -080 New Zones Asia/Khandyga, Asia/Ust-Nera, Europe/Busingen. (Thanks to Tobias Conradi and Arthur David Olson.) - Many changes affect historical time stamps before 1940. + Many changes affect historical timestamps before 1940. These were deduced from: Milne J. Civil time. Geogr J. 1899 Feb;13(2):173-94 . @@ -2193,7 +2317,7 @@ Release 2012e - 2012-08-02 20:44:55 -070 Release code2012c-data2012d - 2012-07-19 16:35:33 -0700 - Changes for Morocco's time stamps, which take effect in a couple of + Changes for Morocco's timestamps, which take effect in a couple of hours, along with infrastructure changes to accommodate how the tz code and data are released on IANA. @@ -2337,12 +2461,12 @@ Release 2011e - 2011-03-31 16:04:38 -040 Release 2011d - 2011-03-14 09:18:01 -0400 - changes that impact present-day time stamps in Cuba, Samoa, and Turkey + changes that impact present-day timestamps in Cuba, Samoa, and Turkey Release 2011c - 2011-03-07 09:30:09 -0500 - These do affect current time stamps in Chile and Annette Island, Canada. + These do affect current timestamps in Chile and Annette Island, Canada. Release 2011b - 2011-02-07 08:44:50 -0500 @@ -3807,7 +3931,7 @@ few (e.g., code2012c-data2012d) have tar numbers. Recent releases also come in an experimental format consisting of a single tarball tzdb-R.tar.lz with extra data. -Release time stamps are taken from the release's commit (for newer, +Release timestamps are taken from the release's commit (for newer, Git-based releases), from the newest file in the tarball (for older releases, where this info is available) or from the email announcing the release (if all else fails; these are marked with a time zone of Modified: stable/10/contrib/tzdata/Theory ============================================================================== --- stable/10/contrib/tzdata/Theory Sat Apr 1 09:31:20 2017 (r316349) +++ stable/10/contrib/tzdata/Theory Sat Apr 1 09:32:05 2017 (r316350) @@ -40,7 +40,7 @@ international standard for UNIX-like sys current edition of POSIX is: The Open Group Base Specifications Issue 7 - IEEE Std 1003.1, 2013 Edition + IEEE Std 1003.1-2008, 2016 Edition @@ -209,6 +209,19 @@ in decreasing order of importance: If there is no common English abbreviation, use numeric offsets like -05 and +0830 that are generated by zic's %z notation. + Use current abbreviations for older timestamps to avoid confusion. + For example, in 1910 a common English abbreviation for UT +01 + in central Europe was 'MEZ' (short for both "Middle European + Zone" and for "Mitteleuropäische Zeit" in German). Nowadays + 'CET' ("Central European Time") is more common in English, and + the database uses 'CET' even for circa-1910 timestamps as this + is less confusing for modern users and avoids the need for + determining when 'CET' supplanted 'MEZ' in common usage. + + Use a consistent style in a zone's history. For example, if a zone's + history tends to use numeric abbreviations and a particular + entry could go either way, use a numeric abbreviation. + [The remaining guidelines predate the introduction of %z. They are problematic as they mean tz data entries invent notation rather than record it. These guidelines are now @@ -226,7 +239,7 @@ in decreasing order of importance: for double summer time append 'DST'; etc. Otherwise, take the first three letters of an English place name identifying each zone and append 'T', 'ST', etc. - as before; e.g. 'VLAST' for VLAdivostok Summer Time. + as before; e.g. 'CHAST' for CHAtham Summer Time. Use UT (with time zone abbreviation '-00') for locations while uninhabited. The leading '-' is a flag that the time @@ -360,12 +373,12 @@ Errors in the tz database arise from man * Civil time was not based on atomic time before 1972, and we don't know the history of earth's rotation accurately enough to map SI seconds to historical solar time to more than about one-hour - accuracy. See: Morrison LV, Stephenson FR. - Historical values of the Earth's clock error Delta T and the - calculation of eclipses. J Hist Astron. 2004;35:327-36 - ; - Historical values of the Earth's clock error. J Hist Astron. 2005;36:339 - . + accuracy. See: Stephenson FR, Morrison LV, Hohenkerk CY. + Measurement of the Earth's rotation: 720 BC to AD 2015. + Proc Royal Soc A. 2016 Dec 7;472:20160404. + http://dx.doi.org/10.1098/rspa.2016.0404 + Also see: Espenak F. Uncertainty in Delta T (ΔT). + http://eclipse.gsfc.nasa.gov/SEhelp/uncertainty2004.html * The relationship between POSIX time (that is, UTC but ignoring leap seconds) and UTC is not agreed upon after 1972. Although the POSIX Modified: stable/10/contrib/tzdata/africa ============================================================================== --- stable/10/contrib/tzdata/africa Sat Apr 1 09:31:20 2017 (r316349) +++ stable/10/contrib/tzdata/africa Sat Apr 1 09:32:05 2017 (r316350) @@ -6,15 +6,15 @@ # tz@iana.org for general use in the future). For more, please see # the file CONTRIBUTING in the tz distribution. -# From Paul Eggert (2014-10-31): +# From Paul Eggert (2017-02-20): # # Unless otherwise specified, the source for data through 1990 is: # Thomas G. Shanks and Rique Pottenger, The International Atlas (6th edition), # San Diego: ACS Publications, Inc. (2003). # Unfortunately this book contains many errors and cites no sources. # -# Gwillim Law writes that a good source -# for recent time zone data is the International Air Transport +# Many years ago Gwillim Law wrote that a good source +# for time zone data was the International Air Transport # Association's Standard Schedules Information Manual (IATA SSIM), # published semiannually. Law sent in several helpful summaries # of the IATA's data after 1990. Except where otherwise noted, @@ -31,39 +31,33 @@ # A reliable and entertaining source about time zones is # Derek Howse, Greenwich time and longitude, Philip Wilson Publishers (1997). # +# European-style abbreviations are commonly used along the Mediterranean. +# For sub-Saharan Africa abbreviations were less standardized. # Previous editions of this database used WAT, CAT, SAT, and EAT -# for +0:00 through +3:00, respectively, -# but Mark R V Murray reports that -# 'SAST' is the official abbreviation for +2:00 in the country of South Africa, -# 'CAT' is commonly used for +2:00 in countries north of South Africa, and -# 'WAT' is probably the best name for +1:00, as the common phrase for +# for UT +00 through +03, respectively, +# but in 1997 Mark R V Murray reported that +# 'SAST' is the official abbreviation for +02 in the country of South Africa, +# 'CAT' is commonly used for +02 in countries north of South Africa, and +# 'WAT' is probably the best name for +01, as the common phrase for # the area that includes Nigeria is "West Africa". -# He has heard of "Western Sahara Time" for +0:00 but can find no reference. # -# To make things confusing, 'WAT' seems to have been used for -1:00 long ago; -# I'd guess that this was because people needed _some_ name for -1:00, -# and at the time, far west Africa was the only major land area in -1:00. -# This usage is now obsolete, as the last use of -1:00 on the African -# mainland seems to have been 1976 in Western Sahara. -# -# To summarize, the following abbreviations seem to have some currency: -# -1:00 WAT West Africa Time (no longer used) -# 0:00 GMT Greenwich Mean Time -# 2:00 CAT Central Africa Time -# 2:00 SAST South Africa Standard Time -# and Murray suggests the following abbreviation: -# 1:00 WAT West Africa Time -# I realize that this leads to 'WAT' being used for both -1:00 and 1:00 -# for times before 1976, but this is the best I can think of -# until we get more information. +# To summarize, the following abbreviations seemed to have some currency: +# +00 GMT Greenwich Mean Time +# +02 CAT Central Africa Time +# +02 SAST South Africa Standard Time +# and Murray suggested the following abbreviation: +# +01 WAT West Africa Time +# Murray's suggestion seems to have caught on in news reports and the like. +# I vaguely recall 'WAT' also being used for -01 in the past but +# cannot now come up with solid citations. # # I invented the following abbreviations; corrections are welcome! -# 2:00 WAST West Africa Summer Time -# 2:30 BEAT British East Africa Time (no longer used) -# 2:45 BEAUT British East Africa Unified Time (no longer used) -# 3:00 CAST Central Africa Summer Time (no longer used) -# 3:00 SAST South Africa Summer Time (no longer used) -# 3:00 EAT East Africa Time +# +02 WAST West Africa Summer Time +# +03 CAST Central Africa Summer Time (no longer used) +# +03 SAST South Africa Summer Time (no longer used) +# +03 EAT East Africa Time +# 'EAT' also seems to have caught on; the others are rare but are paired +# with better-attested non-DST abbreviations. # Algeria # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S @@ -121,17 +115,17 @@ Zone Africa/Algiers 0:12:12 - LMT 1891 M # Cape Verde / Cabo Verde # -# Shanks gives 1907 for the transition to CVT. +# Shanks gives 1907 for the transition to +02. # Perhaps the 1911-05-26 Portuguese decree -# http://dre.pt/pdf1sdip/1911/05/12500/23132313.pdf +# https://dre.pt/pdf1sdip/1911/05/12500/23132313.pdf # merely made it official? # # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Atlantic/Cape_Verde -1:34:04 - LMT 1907 # Praia - -2:00 - CVT 1942 Sep - -2:00 1:00 CVST 1945 Oct 15 - -2:00 - CVT 1975 Nov 25 2:00 - -1:00 - CVT + -2:00 - -02 1942 Sep + -2:00 1:00 -01 1945 Oct 15 + -2:00 - -02 1975 Nov 25 2:00 + -1:00 - -01 # Central African Republic # See Africa/Lagos. @@ -388,7 +382,7 @@ Rule Ghana 1920 1942 - Sep 1 0:00 0:20 Rule Ghana 1920 1942 - Dec 31 0:00 0 GMT # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Africa/Accra -0:00:52 - LMT 1918 - 0:00 Ghana %s + 0:00 Ghana GMT/+0020 # Guinea # See Africa/Abidjan. @@ -397,20 +391,20 @@ Zone Africa/Accra -0:00:52 - LMT 1918 # # Shanks gives 1911-05-26 for the transition to WAT, # evidently confusing the date of the Portuguese decree -# http://dre.pt/pdf1sdip/1911/05/12500/23132313.pdf +# https://dre.pt/pdf1sdip/1911/05/12500/23132313.pdf # with the date that it took effect, namely 1912-01-01. # # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Africa/Bissau -1:02:20 - LMT 1912 Jan 1 - -1:00 - WAT 1975 + -1:00 - -01 1975 0:00 - GMT # Kenya # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Africa/Nairobi 2:27:16 - LMT 1928 Jul 3:00 - EAT 1930 - 2:30 - BEAT 1940 - 2:45 - BEAUT 1960 + 2:30 - +0230 1940 + 2:45 - +0245 1960 3:00 - EAT Link Africa/Nairobi Africa/Addis_Ababa # Ethiopia Link Africa/Nairobi Africa/Asmara # Eritrea @@ -426,18 +420,25 @@ Link Africa/Nairobi Indian/Mayotte # See Africa/Johannesburg. # Liberia -# From Paul Eggert (2006-03-22): -# In 1972 Liberia was the last country to switch -# from a UTC offset that was not a multiple of 15 or 20 minutes. -# Howse reports that it was in honor of their president's birthday. -# Shank & Pottenger report the date as May 1, whereas Howse reports Jan; -# go with Shanks & Pottenger. -# For Liberia before 1972, Shanks & Pottenger report -0:44, whereas Howse and -# Whitman each report -0:44:30; go with the more precise figure. +# +# From Paul Eggert (2017-03-02): +# +# The Nautical Almanac for the Year 1970, p 264, is the source for -0:44:30. +# +# In 1972 Liberia was the last country to switch from a UTC offset +# that was not a multiple of 15 or 20 minutes. The 1972 change was on +# 1972-01-07, according to an entry dated 1972-01-04 on p 330 of: +# Presidential Papers: First year of the administration of +# President William R. Tolbert, Jr., July 23, 1971-July 31, 1972. +# Monrovia: Executive Mansion. +# +# Use the abbreviation "MMT" before 1972, as the more-accurate numeric +# abbreviation "-004430" would be one byte over the POSIX limit. +# # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Africa/Monrovia -0:43:08 - LMT 1882 -0:43:08 - MMT 1919 Mar # Monrovia Mean Time - -0:44:30 - LRT 1972 May # Liberia Time + -0:44:30 - MMT 1972 Jan 7 # approximately MMT 0:00 - GMT ############################################################################### @@ -596,7 +597,7 @@ Rule Mauritius 2008 only - Oct lastSun 2 Rule Mauritius 2009 only - Mar lastSun 2:00 0 - # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Indian/Mauritius 3:50:00 - LMT 1907 # Port Louis - 4:00 Mauritius MU%sT # Mauritius Time + 4:00 Mauritius +04/+05 # Agalega Is, Rodriguez # no information; probably like Indian/Mauritius @@ -915,14 +916,14 @@ Zone Africa/Casablanca -0:30:20 - LMT 19 # since most of it was then controlled by Morocco. Zone Africa/El_Aaiun -0:52:48 - LMT 1934 Jan # El Aaiún - -1:00 - WAT 1976 Apr 14 + -1:00 - -01 1976 Apr 14 0:00 Morocco WE%sT # Mozambique # # Shanks gives 1903-03-01 for the transition to CAT. # Perhaps the 1911-05-26 Portuguese decree -# http://dre.pt/pdf1sdip/1911/05/12500/23132313.pdf +# https://dre.pt/pdf1sdip/1911/05/12500/23132313.pdf # merely made it official? # # Zone NAME GMTOFF RULES FORMAT [UNTIL] @@ -949,16 +950,19 @@ Link Africa/Maputo Africa/Lusaka # Zambi # the country are close to 40 minutes earlier in sunrise than the rest # of the country. # -# From Paul Eggert (2007-03-31): -# Apparently the Caprivi Strip informally observes Botswana time, but -# we have no details. In the meantime people there can use Africa/Gaborone. +# From Paul Eggert (2017-02-22): +# Although the Zambezi Region (formerly known as Caprivi) informally +# observes Botswana time, we have no details about historical practice. +# In the meantime people there can use Africa/Gaborone. +# See: Immanuel S. The Namibian. 2017-02-23. +# http://www.namibian.com.na/51480/read/Time-change-divides-lawmakers # RULE NAME FROM TO TYPE IN ON AT SAVE LETTER/S Rule Namibia 1994 max - Sep Sun>=1 2:00 1:00 S Rule Namibia 1995 max - Apr Sun>=1 2:00 0 - # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Africa/Windhoek 1:08:24 - LMT 1892 Feb 8 - 1:30 - SWAT 1903 Mar # SW Africa Time + 1:30 - +0130 1903 Mar 2:00 - SAST 1942 Sep 20 2:00 2:00 1:00 SAST 1943 Mar 21 2:00 2:00 - SAST 1990 Mar 21 # independence @@ -985,7 +989,7 @@ Link Africa/Lagos Africa/Porto-Novo # B # Réunion # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Indian/Reunion 3:41:52 - LMT 1911 Jun # Saint-Denis - 4:00 - RET # Réunion Time + 4:00 - +04 # # Crozet Islands also observes Réunion time; see the 'antarctica' file. # @@ -1020,7 +1024,7 @@ Zone Indian/Reunion 3:41:52 - LMT 1911 J # Seychelles # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Indian/Mahe 3:41:48 - LMT 1906 Jun # Victoria - 4:00 - SCT # Seychelles Time + 4:00 - +04 # From Paul Eggert (2001-05-30): # Aldabra, Farquhar, and Desroches, originally dependencies of the # Seychelles, were transferred to the British Indian Ocean Territory Modified: stable/10/contrib/tzdata/antarctica ============================================================================== --- stable/10/contrib/tzdata/antarctica Sat Apr 1 09:31:20 2017 (r316349) +++ stable/10/contrib/tzdata/antarctica Sat Apr 1 09:32:05 2017 (r316350) @@ -110,7 +110,8 @@ Zone Antarctica/Mawson 0 - -00 1954 Feb # O'Higgins, Antarctic Peninsula, -6319-05704, since 1948-02 # Prat, -6230-05941 # Villa Las Estrellas (a town), around the Frei base, since 1984-04-09 -# These locations have always used Santiago time; use TZ='America/Santiago'. +# These locations employ Region of Magallanes time; use +# TZ='America/Punta_Arenas'. # China - year-round bases # Great Wall, King George Island, -6213-05858, since 1985-02-20 Modified: stable/10/contrib/tzdata/asia ============================================================================== --- stable/10/contrib/tzdata/asia Sat Apr 1 09:31:20 2017 (r316349) +++ stable/10/contrib/tzdata/asia Sat Apr 1 09:32:05 2017 (r316350) @@ -6,15 +6,15 @@ # tz@iana.org for general use in the future). For more, please see # the file CONTRIBUTING in the tz distribution. -# From Paul Eggert (2015-08-08): +# From Paul Eggert (2017-01-13): # # Unless otherwise specified, the source for data through 1990 is: # Thomas G. Shanks and Rique Pottenger, The International Atlas (6th edition), # San Diego: ACS Publications, Inc. (2003). # Unfortunately this book contains many errors and cites no sources. # -# Gwillim Law writes that a good source -# for recent time zone data is the International Air Transport +# Many years ago Gwillim Law wrote that a good source +# for time zone data was the International Air Transport # Association's Standard Schedules Information Manual (IATA SSIM), # published semiannually. Law sent in several helpful summaries # of the IATA's data after 1990. Except where otherwise noted, @@ -35,29 +35,24 @@ # A reliable and entertaining source about time zones is # Derek Howse, Greenwich time and longitude, Philip Wilson Publishers (1997). # -# I invented the abbreviations marked '*' in the following table; -# the rest are from earlier versions of this file, or from other sources. -# Corrections are welcome! +# The following alphabetic abbreviations appear in these tables: # std dst # LMT Local Mean Time # 2:00 EET EEST Eastern European Time # 2:00 IST IDT Israel -# 3:00 AST ADT Arabia* -# 3:30 IRST IRDT Iran* -# 4:00 GST Gulf* # 5:30 IST India -# 7:00 ICT Indochina, most times and locations* # 7:00 WIB west Indonesia (Waktu Indonesia Barat) # 8:00 WITA central Indonesia (Waktu Indonesia Tengah) # 8:00 CST China -# 8:00 IDT Indochina, 1943-45, 1947-55, 1960-75 (some locations)* -# 8:00 JWST Western Standard Time (Japan, 1896/1937)* -# 8:30 KST KDT Korea when at +0830* -# 9:00 JCST Central Standard Time (Japan, 1896/1937) +# 8:30 KST KDT Korea when at +0830 # 9:00 WIT east Indonesia (Waktu Indonesia Timur) # 9:00 JST JDT Japan *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable-10@freebsd.org Sat Apr 1 09:37:17 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 27433D26BD6; Sat, 1 Apr 2017 09:37:17 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ACACAAB6; Sat, 1 Apr 2017 09:37:16 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v319bFG4063513; Sat, 1 Apr 2017 09:37:15 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v319bFu2063512; Sat, 1 Apr 2017 09:37:15 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201704010937.v319bFu2063512@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 1 Apr 2017 09:37:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r316352 - stable/10/share/misc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Apr 2017 09:37:17 -0000 Author: bapt Date: Sat Apr 1 09:37:15 2017 New Revision: 316352 URL: https://svnweb.freebsd.org/changeset/base/316352 Log: MFC: r313961 r316061 Update pci_vendors to 2017-03-16 Modified: stable/10/share/misc/pci_vendors Directory Properties: stable/10/ (props changed) Modified: stable/10/share/misc/pci_vendors ============================================================================== --- stable/10/share/misc/pci_vendors Sat Apr 1 09:33:22 2017 (r316351) +++ stable/10/share/misc/pci_vendors Sat Apr 1 09:37:15 2017 (r316352) @@ -3,8 +3,8 @@ # # List of PCI ID's # -# Version: 2017.01.08 -# Date: 2017-01-08 03:15:02 +# Version: 2017.03.16 +# Date: 2017-03-16 03:15:01 # # Maintained by Albert Pool, Martin Mares, and other volunteers from # the PCI ID Project at http://pci-ids.ucw.cz/. @@ -2254,6 +2254,7 @@ 1043 2016 Trinidad PRO [Radeon R9 370 OEM] 1458 2016 Trinidad PRO [Radeon R9 370 OEM] 1462 2016 Trinidad PRO [Radeon R9 370 OEM] + 1462 3050 R9 270 Gaming OC 148c 2016 Trinidad PRO [Radeon R9 370 OEM] 1682 2015 Trinidad PRO [Radeon R7 370] 174b 2016 Trinidad PRO [Radeon R9 370 OEM] @@ -2425,6 +2426,7 @@ 144d c0c7 Radeon HD 7550M 6842 Thames LE [Radeon HD 7000M Series] 6843 Thames [Radeon HD 7670M] + 687f Vega [Radeon RX Vega] 6888 Cypress XT [FirePro V8800] 6889 Cypress PRO [FirePro V7800] 1002 0301 FirePro V7800P @@ -5520,6 +5522,10 @@ 8056 Rockwell HCF 56K modem 808a Memory Stick Controller 81ce SxS Pro memory card +# 2nd ID + 905c SxS Pro memory card +# 2nd ID + 907f SxS Pro+ memory card 908f Aeolia ACPI 909e Aeolia Ethernet Controller (Marvell Yukon 2 Family) 909f Aeolia SATA AHCI Controller @@ -5528,6 +5534,7 @@ 90a2 Aeolia DMA Controller 90a3 Aeolia Memory (DDR3/SPM) 90a4 Aeolia USB 3.0 xHCI Host Controller + 90bc SxS Pro+ memory card 104e Oak Technology, Inc 0017 OTI-64017 0107 OTI-107 [Spitfire] @@ -6093,6 +6100,20 @@ 1077 0246 8300 Series Dual Port 10GbE Converged Network Adapter (TCP/IP Networking) 8031 8300 Series 10GbE Converged Network Adapter (FCoE) 8032 8300 Series 10GbE Converged Network Adapter (iSCSI) + 8070 FastLinQ QL41000 Series 10/25/40/50GbE Controller + 1077 0011 FastLinQ QL41212H 25GbE Adapter + 1077 0012 FastLinQ QL41112H 10GbE Adapter + 8080 FastLinQ QL41000 Series 10/25/40/50GbE Controller (FCoE) + 1077 000d FastLinQ QL41262H 25GbE FCoE Adapter + 1077 000e FastLinQ QL41162H 10GbE FCoE Adapter + 8084 FastLinQ QL41000 Series 10/25/40/50GbE Controller (iSCSI) + 1077 000d FastLinQ QL41262H 25GbE iSCSI Adapter + 1077 000e FastLinQ QL41162H 10GbE iSCSI Adapter + 8090 FastLinQ QL41000 Series Gigabit Ethernet Controller (SR-IOV VF) + 1077 000d FastLinQ QL41262H 25GbE FCoE Adapter (SR-IOV VF) + 1077 000e FastLinQ QL41162H 10GbE iSCSI Adapter (SR-IOV VF) + 1077 0011 FastLinQ QL41212H 25GbE Adapter (SR-IOV VF) + 1077 0012 FastLinQ QL41112H 10GbE Adapter (SR-IOV VF) 8430 ISP8324 1/10GbE Converged Network Controller (NIC VF) 8431 8300 Series 10GbE Converged Network Adapter (FCoE VF) 8432 ISP2432M-based 10GbE Converged Network Adapter (CNA) @@ -10094,6 +10115,7 @@ 10d8 GT218 [NVS 300] 10ef GP102 HDMI Audio Controller 10f0 GP104 High Definition Audio Controller + 10f1 GP106 High Definition Audio Controller 1140 GF117M [GeForce 610M/710M/810M/820M / GT 620M/625M/630M/720M] 1019 0799 GeForce 820M 1019 999f GeForce GT 720M @@ -10584,6 +10606,7 @@ 1347 GM108M [GeForce 940M] 1348 GM108M [GeForce 945M / 945A] 1349 GM108M [GeForce 930M] + 134b GM108M [GeForce 940MX] 134d GM108M [GeForce 940MX] 134e GM108M [GeForce 930MX] 134f GM108M [GeForce 920MX] @@ -10616,6 +10639,8 @@ 13b1 GM107GLM [Quadro M1000M] 13b2 GM107GLM [Quadro M600M] 13b3 GM107GLM [Quadro K2200M] + 13b4 GM107GLM [Quadro M620 Mobile] + 13b6 GM107GLM [Quadro M1200 Mobile] 13b9 GM107GL [NVS 810] 13ba GM107GL [Quadro K2200] 13bb GM107GL [Quadro K620] @@ -10648,6 +10673,7 @@ 1427 GM206M [GeForce GTX 965M] 1430 GM206GL [Quadro M2000] 1431 GM206GL [Tesla M4] + 1436 GM206GLM [Quadro M2200 Mobile] 15f0 GP100GL 15f1 GP100GL 15f7 GP100GL [Tesla P100 PCIe 12GB] @@ -10668,6 +10694,7 @@ 17fd GM200GL [Tesla M40] 1b00 GP102 [TITAN X] 1b01 GP102 + 1b06 GP102 [GeForce GTX 1080 Ti] 1b30 GP102GL [Quadro P6000] 1b38 GP102GL [Tesla P40] 1b70 GP102GL @@ -10677,33 +10704,39 @@ 1b82 GP104 1b83 GP104 1b84 GP104 [GeForce GTX 1060 3GB] - 1ba0 GP104M [GeForce GTX 1080] - 1ba1 GP104M [GeForce GTX 1070] + 1ba0 GP104M [GeForce GTX 1080 Mobile] + 1ba1 GP104M [GeForce GTX 1070 Mobile] 1bb0 GP104GL [Quadro P5000] 1bb1 GP104GL 1bb3 GP104GL [Tesla P4] 1bb4 GP104GL - 1be0 GP104M [GeForce GTX 1080] - 1be1 GP104M [GeForce GTX 1070] + 1bb6 GP104GLM [Quadro P5000 Mobile] + 1bb7 GP104GLM [Quadro P4000 Mobile] + 1bb8 GP104GLM [Quadro P3000 Mobile] + 1be0 GP104M [GeForce GTX 1080 Mobile] + 1be1 GP104M [GeForce GTX 1070 Mobile] 1c00 GP106 1c01 GP106 1c02 GP106 [GeForce GTX 1060 3GB] 1c03 GP106 [GeForce GTX 1060 6GB] - 1c20 GP106M [GeForce GTX 1060] + 1c20 GP106M [GeForce GTX 1060 Mobile] 1c30 GP106GL 1c35 GP106 - 1c60 GP106M [GeForce GTX 1060] + 1c60 GP106M [GeForce GTX 1060 Mobile] + 1c61 GP106M [GeForce GTX 1050 Ti Mobile] + 1c62 GP106M [GeForce GTX 1050 Mobile] 1c70 GP106GL 1c80 GP107 1c81 GP107 [GeForce GTX 1050] 1c82 GP107 [GeForce GTX 1050 Ti] - 1c8c GP107M [GeForce GTX 1050 Ti] - 1c8d GP107M [GeForce GTX 1050] + 1c8c GP107M [GeForce GTX 1050 Ti Mobile] + 1c8d GP107M [GeForce GTX 1050 Mobile] 1c8e GP107M 1ca7 GP107GL 1ca8 GP107GL 1caa GP107GL 1d01 GP108 + 1d81 GV100 10df Emulex Corporation 0720 OneConnect NIC (Skyhawk) 103c 1934 FlexFabric 20Gb 2-port 650M Adapter @@ -11023,6 +11056,7 @@ 8813 RTL8813AE 802.11ac PCIe Wireless Network Adapter 8821 RTL8821AE 802.11ac PCIe Wireless Network Adapter b723 RTL8723BE PCIe Wireless Network Adapter + 10ec 8739 Dell Wireless 1801 10ed Ascii Corporation 7310 V7310 10ee Xilinx Corporation @@ -13224,6 +13258,7 @@ 0001 FireStream 155 0003 FireStream 50 119f Bull HN Information Systems + 1081 BXI Host Channel Adapter 11a0 Convex Computer Corporation 11a1 Hamamatsu Photonics K.K. 11a2 Sierra Research and Technology @@ -16021,6 +16056,9 @@ 509b T540-509B Unified Wire Ethernet Controller 509c T520-509C Unified Wire Ethernet Controller 509d T540-509D Unified Wire Ethernet Controller + 509e T520-509E Unified Wire Ethernet Controller + 509f T540-509F Unified Wire Ethernet Controller + 50a0 T540-50A0 Unified Wire Ethernet Controller 5401 T520-CR Unified Wire Ethernet Controller 5402 T522-CR Unified Wire Ethernet Controller 5403 T540-CR Unified Wire Ethernet Controller @@ -16049,7 +16087,7 @@ 5481 T540-5081 Unified Wire Ethernet Controller 5482 T504-5082 Unified Wire Ethernet Controller 5483 T540-5083 Unified Wire Ethernet Controller - 5484 T580-5084 Unified Wire Ethernet Controller + 5484 T540-5084 Unified Wire Ethernet Controller 5485 T580-5085 Unified Wire Ethernet Controller 5486 T580-5086 Unified Wire Ethernet Controller 5487 T580-5087 Unified Wire Ethernet Controller @@ -16069,6 +16107,9 @@ 549b T540-509B Unified Wire Ethernet Controller 549c T520-509C Unified Wire Ethernet Controller 549d T540-509D Unified Wire Ethernet Controller + 549e T520-509E Unified Wire Ethernet Controller + 549f T540-509F Unified Wire Ethernet Controller + 54a0 T540-50A0 Unified Wire Ethernet Controller 5501 T520-CR Unified Wire Storage Controller 5502 T522-CR Unified Wire Storage Controller 5503 T540-CR Unified Wire Storage Controller @@ -16097,7 +16138,7 @@ 5581 T540-5081 Unified Wire Storage Controller 5582 T504-5082 Unified Wire Storage Controller 5583 T540-5083 Unified Wire Storage Controller - 5584 T580-5084 Unified Wire Storage Controller + 5584 T540-5084 Unified Wire Storage Controller 5585 T580-5085 Unified Wire Storage Controller 5586 T580-5086 Unified Wire Storage Controller 5587 T580-5087 Unified Wire Storage Controller @@ -16117,6 +16158,9 @@ 559b T540-509B Unified Wire Storage Controller 559c T520-509C Unified Wire Storage Controller 559d T540-509D Unified Wire Storage Controller + 559e T520-509E Unified Wire Storage Controller + 559f T540-509F Unified Wire Storage Controller + 55a0 T540-50A0 Unified Wire Storage Controller 5601 T520-CR Unified Wire Storage Controller 5602 T522-CR Unified Wire Storage Controller 5603 T540-CR Unified Wire Storage Controller @@ -16145,7 +16189,7 @@ 5681 T540-5081 Unified Wire Storage Controller 5682 T504-5082 Unified Wire Storage Controller 5683 T540-5083 Unified Wire Storage Controller - 5684 T580-5084 Unified Wire Storage Controller + 5684 T540-5084 Unified Wire Storage Controller 5685 T580-5085 Unified Wire Storage Controller 5686 T580-5086 Unified Wire Storage Controller 5687 T580-5087 Unified Wire Storage Controller @@ -16165,6 +16209,9 @@ 569b T540-509B Unified Wire Storage Controller 569c T520-509C Unified Wire Storage Controller 569d T540-509D Unified Wire Storage Controller + 569e T520-509E Unified Wire Storage Controller + 569f T540-509F Unified Wire Storage Controller + 56a0 T540-50A0 Unified Wire Storage Controller 5701 T520-CR Unified Wire Ethernet Controller 5702 T522-CR Unified Wire Ethernet Controller 5703 T540-CR Unified Wire Ethernet Controller @@ -16232,7 +16279,7 @@ 5881 T540-5081 Unified Wire Ethernet Controller [VF] 5882 T504-5082 Unified Wire Ethernet Controller [VF] 5883 T540-5083 Unified Wire Ethernet Controller [VF] - 5884 T580-5084 Unified Wire Ethernet Controller [VF] + 5884 T540-5084 Unified Wire Ethernet Controller [VF] 5885 T580-5085 Unified Wire Ethernet Controller [VF] 5886 T580-5086 Unified Wire Ethernet Controller [VF] 5887 T580-5087 Unified Wire Ethernet Controller [VF] @@ -16252,6 +16299,9 @@ 589b T540-509B Unified Wire Ethernet Controller [VF] 589c T520-509C Unified Wire Ethernet Controller [VF] 589d T540-509D Unified Wire Ethernet Controller [VF] + 589e T520-509E Unified Wire Ethernet Controller [VF] + 589f T540-509F Unified Wire Ethernet Controller [VF] + 58a0 T540-50A0 Unified Wire Ethernet Controller [VF] 6001 T6225-CR Unified Wire Ethernet Controller 6002 T6225-SO-CR Unified Wire Ethernet Controller 6003 T6425-CR Unified Wire Ethernet Controller @@ -16265,6 +16315,8 @@ 6011 T6225-LL-CR Unified Wire Ethernet Controller 6014 T61100-OCP-SO Unified Wire Ethernet Controller 6015 T6201-BT Unified Wire Ethernet Controller + 6080 T6225-6080 Unified Wire Ethernet Controller + 6081 T62100-6081 Unified Wire Ethernet Controller 6401 T6225-CR Unified Wire Ethernet Controller 6402 T6225-SO-CR Unified Wire Ethernet Controller 6403 T6425-CR Unified Wire Ethernet Controller @@ -16278,6 +16330,8 @@ 6411 T6225-LL-CR Unified Wire Ethernet Controller 6414 T61100-OCP-SO Unified Wire Ethernet Controller 6415 T6201-BT Unified Wire Ethernet Controller + 6480 T6225-6080 Unified Wire Ethernet Controller + 6481 T62100-6081 Unified Wire Ethernet Controller 6501 T6225-CR Unified Wire Storage Controller 6502 T6225-SO-CR Unified Wire Storage Controller 6503 T6425-CR Unified Wire Storage Controller @@ -16291,6 +16345,8 @@ 6511 T6225-LL-CR Unified Wire Storage Controller 6514 T61100-OCP-SO Unified Wire Storage Controller 6515 T6201-BT Unified Wire Storage Controller + 6580 T6225-6080 Unified Wire Storage Controller + 6581 T62100-6081 Unified Wire Storage Controller 6601 T6225-CR Unified Wire Storage Controller 6602 T6225-SO-CR Unified Wire Storage Controller 6603 T6425-CR Unified Wire Storage Controller @@ -16304,6 +16360,8 @@ 6611 T6225-LL-CR Unified Wire Storage Controller 6614 T61100-OCP-SO Unified Wire Storage Controller 6615 T6201-BT Unified Wire Storage Controller + 6680 T6225-6080 Unified Wire Storage Controller + 6681 T62100-6081 Unified Wire Storage Controller 6801 T6225-CR Unified Wire Ethernet Controller [VF] 6802 T6225-SO-CR Unified Wire Ethernet Controller [VF] 6803 T6425-CR Unified Wire Ethernet Controller [VF] @@ -16317,6 +16375,8 @@ 6811 T6225-LL-CR Unified Wire Ethernet Controller [VF] 6814 T61100-OCP-SO Unified Wire Ethernet Controller [VF] 6815 T6201-BT Unified Wire Ethernet Controller [VF] + 6880 T6225-6080 Unified Wire Ethernet Controller [VF] + 6881 T62100-6081 Unified Wire Ethernet Controller [VF] a000 PE10K Unified Wire Ethernet Controller 1426 Storage Technology Corp. 1427 Better On-Line Solutions @@ -16406,6 +16466,14 @@ 1028 1fc1 Express Flash NVMe PM1725 800GB SFF 1028 1fc2 Express Flash NVMe PM1725 1.6TB SFF 1028 1fc4 Express Flash NVMe PM1725 1.6TB AIC + a822 NVMe SSD Controller 172Xa + 1028 1fd9 Express Flash NVMe PM1725a 800GB SFF + 1028 1fda Express Flash PM1725a 1.6TB SFF + 1028 1fdb Express Flash PM1725a 3.2TB SFF + 1028 1fdc Express Flash PM1725a 6.4TB SFF + 1028 1fdd Express Flash PM1725a 1.6TB AIC + 1028 1fde Express Flash PM1725a 3.2TB AIC + 1028 1fdf Express Flash PM1725a 6.4TB AIC 144e OLITEC 144f Askey Computer Corp. 1450 Octave Communications Ind. @@ -16516,6 +16584,7 @@ 14a2 Millennium Engineering Inc 14a3 Maverick Networks 14a4 Lite-On Technology Corporation + 22f1 M8Pe Series NVMe SSD # Wrong vendor ID used 4318 Broadcom BCM4318 [AirForce One 54g] 802.11g WLAN Controller 14a5 XIONICS Document Technologies Inc @@ -17044,14 +17113,14 @@ 16c8 BCM57301 NetXtreme-C 10Gb Ethernet Controller 16c9 BCM57302 NetXtreme-C 10Gb/25Gb Ethernet Controller 16ca BCM57304 NetXtreme-C 10Gb/25Gb/40Gb/50Gb Ethernet Controller - 16cb BCM57304 NetXtreme-C Ethernet Virtual Function + 16cb NetXtreme-C Ethernet Virtual Function 16cc BCM57417 NetXtreme-E Ethernet Partition 16ce BCM57311 NetXtreme-C 10Gb RDMA Ethernet Controller 16cf BCM57312 NetXtreme-C 10Gb/25Gb RDMA Ethernet Controller 16d0 BCM57402 NetXtreme-E 10Gb Ethernet Controller 16d1 BCM57404 NetXtreme-E 10Gb/25Gb Ethernet Controller 16d2 BCM57406 NetXtreme-E 10GBASE-T Ethernet Controller - 16d3 BCM57404 NetXtreme-E Ethernet Virtual Function + 16d3 NetXtreme-E Ethernet Virtual Function 16d4 BCM57402 NetXtreme-E Ethernet Partition 16d5 BCM57407 NetXtreme-E 10GBase-T Ethernet Controller 16d6 BCM57412 NetXtreme-E 10Gb RDMA Ethernet Controller @@ -17063,14 +17132,15 @@ 1590 0212 Ethernet 10Gb 2-port 535FLR-T Adapter 16d9 BCM57417 NetXtreme-E 10GBASE-T RDMA Ethernet Controller 108e 4866 Dual Port 10GBase-T Ethernet Controller - 16dc BCM57414 NetXtreme-E Ethernet Virtual Function + 16dc NetXtreme-E Ethernet Virtual Function 16dd NetLink BCM5781 Gigabit Ethernet PCI Express 16de BCM57412 NetXtreme-E Ethernet Partition 16df BCM57314 NetXtreme-C 10Gb/25Gb/40Gb/50Gb RDMA Ethernet Controller - 16e1 BCM57314 NetXtreme-C Ethernet Virtual Function + 16e1 NetXtreme-C Ethernet Virtual Function 16e2 BCM57417 NetXtreme-E 10Gb/25Gb RDMA Ethernet Controller 108e 4866 Dual Port 10Gb/25Gb SFP28 Ethernet Controller 16e3 BCM57416 NetXtreme-E 10Gb RDMA Ethernet Controller + 16e5 NetXtreme-C RDMA Virtual Function 16e7 BCM57404 NetXtreme-E Ethernet Partition 16e8 BCM57406 NetXtreme-E Ethernet Partition 16e9 BCM57407 NetXtreme-E 25Gb Ethernet Controller @@ -17355,6 +17425,10 @@ b334 BCM56334 StrataXGS 24x1GE 4x10GE Switch Controller b800 BCM56800 StrataXGS 10GE Switch Controller b842 BCM56842 Trident 10GE Switch Controller +# Trident2 + b850 Broadcom BCM56850 Switch ASIC +# Tomahawk + b960 Broadcom BCM56960 Switch ASIC 14e5 Pixelfusion Ltd 14e6 SHINING Technology Inc 14e7 3CX @@ -17957,6 +18031,7 @@ 1599 Delta Electronics Inc 159a General Instrument 159b Faraday Technology Corp + 4321 StorLink SL3516 (Gemini) Host Bridge 159c Stratus Computer Systems 159d Ningbo Harrison Electronics Co Ltd 159e A-Max Technology Co Ltd @@ -18013,6 +18088,7 @@ 024f MT53100 [Spectrum-2, Flash recovery mode] 0262 MT27710 [ConnectX-4 Lx Programmable] EN 0263 MT27710 [ConnectX-4 Lx Programmable Virtual Function] EN + 0281 NPS-600 Flash Recovery 1002 MT25400 Family [ConnectX-2 Virtual Function] 1003 MT27500 Family [ConnectX-3] 103c 1777 InfiniBand FDR/EN 10/40Gb Dual Port 544FLR-QSFP Adapter (Rev Cx) @@ -18096,6 +18172,7 @@ 7123 NPS-600 network interface VF a2d0 MT416842 BlueField SoC Crypto enabled a2d1 MT416842 BlueField SoC Crypto disabled + a2d2 MT416842 BlueField integrated ConnectX-5 network controller a2d3 MT416842 BlueField multicore SoC family VF # SwitchX-2, 40GbE switch c738 MT51136 @@ -18872,10 +18949,18 @@ 9700 Octeon III CN73XX Network Processor 9702 CN23XX [LiquidIO II] Intelligent Adapter 177d 0003 CN2350 [LiquidIO II] 2-port 10GbE Intelligent adapter - 177d 0004 CN2350 [LiquidIO II] 2-port 25GbE Intelligent adapter +# This was changed during the production phase to 10GbE adapter. + 177d 0004 CN2350 [LiquidIO II] 2-port 10GbE Intelligent adapter + 177d 0005 CN2360 [LiquidIO II] 2-port 10GbE Intelligent adapter + 177d 0006 CN2360 [LiquidIO II] 2-port 25GbE Intelligent adapter + 177d 0007 CN2350 [LiquidIO II] 2-port 25GbE Intelligent adapter 9703 CN23XX [LiquidIO II] NVMe Controller 9712 CN23XX [LiquidIO II] SRIOV Virtual Function 177d 0003 CN2350 [LiquidIO II] 2-port 10GbE SRIOV Virtual Function + 177d 0004 CN2350 [LiquidIO II] 2-port 10GbE SRIOV Virtual Function + 177d 0005 CN2360 [LiquidIO II] 2-port 10GbE SRIOV Virtual Function + 177d 0006 CN2360 [LiquidIO II] 2-port 25GbE SRIOV Virtual Function + 177d 0007 CN2350 [LiquidIO II] 2-port 25GbE SRIOV Virtual Function 9713 CN23XX [LiquidIO II] NVMe SRIOV Virtual Function 9800 Octeon Fusion CNF75XX Processor a001 ThunderX MRML(Master RML Bridge to RSL devices) @@ -19445,8 +19530,8 @@ 0155 NT100E3-1-PTP Network Adapter 1x100Gb 0165 NT80E3-2-PTP Network Adapter 2x40Gb 0175 NT20E3-2-PTP Network Adapter 2x10Gb - 0185 NT40A01-4x1 Network Adapter 4x1Gb - 01a5 NT200A01 Network Adapter 2x100Gb + 0185 NT40A01 Network Adapter + 01a5 NT200A01 Network Adapter 18f6 NextIO 1000 [Nexsis] Switch Virtual P2P PCIe Bridge 1001 [Texsis] Switch Virtual P2P PCIe Bridge @@ -19602,14 +19687,15 @@ 1924 800e SFN7x42Q-R2 Flareon Ultra 7000 Series 10/40G Adapter 1924 800f SFN7xx4F-R1 Flareon Ultra 7000 Series 10G Adapter 0a03 SFC9220 10/40G Ethernet Controller - 1924 8011 SFN 8022-R1 Solarflare Flareon 8000 Series 10G Adapter + 1924 8011 SFN8022-R1 Flareon 8000 Series 10G Adapter 1924 8012 SFN8522-R1 Flareon Ultra 8000 Series 10G Adapter - 1924 8013 SFN8042-R1 Solarflare Flareon 8000 Series 10/40G Adapter + 1924 8013 SFN8042-R1 Flareon 8000 Series 10/40G Adapter 1924 8014 SFN8542-R1 Flareon Ultra 8000 Series 10/40G Adapter 1924 8016 SFN8022-R2 Flareon 8000 Series 10G Adapter 1924 8017 SFN8522-R2 Flareon Ultra 8000 Series 10G Adapter 1924 8018 SFN8042-R2 Flareon 8000 Series 10/40G Adapter 1924 8019 SFN8542-R2 Flareon Ultra 8000 Series 10/40G Adapter + 1924 801a SFN8722-R1 Flareon Ultra 8000 Series OCP 10G Adapter 1803 SFC9020 10G Ethernet Controller (Virtual Function) 1813 SFL9021 10GBASE-T Ethernet Controller (Virtual Function) 1903 SFC9120 10G Ethernet Controller (Virtual Function) @@ -19902,6 +19988,7 @@ 5808 DDRdrive X8 dd52 DDRdrive X1-30 19e5 Huawei Technologies Co., Ltd. + 1711 Hi1710 [iBMC Intelligent Management system chip w/VGA support] 19e7 NET (Network Equipment Technologies) 1001 STIX DSP Card 1002 STIX - 1 Port T1/E1 Card @@ -20101,7 +20188,7 @@ 1b03 Magnum Semiconductor, Inc, 6100 DXT/DXTPro Multiformat Broadcast HD/SD Encoder/Decoder/Transcoder 7000 D7 Multiformat Broadcast HD/SD Encoder/Decoder/Transcoder -1b08 MSC Vertriebs GmbH +1b08 MSC Technologies GmbH 1b0a Pegatron 1b13 Jaton Corp 1b1a K&F Computing Research Co. @@ -20318,6 +20405,8 @@ 0003 Ultrastar SN100 Series NVMe SSD 1014 04f5 PCIe3 1.6TB NVMe Flash Adapter 1014 04f6 PCIe3 3.2TB NVMe Flash Adapter +1c5f Beijing Memblaze Technology Co. Ltd. + 0540 PBlaze4 NVMe SSD # http://www.nicevt.ru/ (in Russian) 1c63 Science and Research Centre of Computer Technology (JSC "NICEVT") # http://www.radiotec.ru/catalog.php?cat=jr8&art=14109 @@ -20392,6 +20481,7 @@ 4200 A5PL-E1-10GETI [10 GbE Ethernet Traffic Instrument] 1d78 DERA 1d7c Aerotech, Inc. +1d87 Rockchip Inc. RK3399 PCI Express Root Port 1d8f Enyx 1d95 Graphcore Ltd 1da1 Teko Telecom S.r.l. @@ -20437,16 +20527,18 @@ 4022 TN9310 10GbE SFP+ Ethernet Adapter 1043 8709 XG-C100F 10GbE SFP+ Ethernet Adapter 1186 4d00 DXE-810S 10GbE SFP+ Ethernet Adapter - 1432 8103 EN-8102PF 10GbE SPF+ Ethernet Adapter + 1432 8103 10 Gigabit Ethernet SFP+ PCI Express Adapter 1fc9 3015 Ethernet Adapter 4024 TN9210 10GBase-T Ethernet Adapter 4025 TN9510 10GBase-T/NBASE-T Ethernet Adapter 105a 7203 SANLink3 NBase-T1 1186 2900 DXE-810T 10GBase-T Ethernet Adapter - 1432 8102 EN-8102P 10GbE Ethernet Adapter + 1432 8102 10 Gigabit Ethernet PCI Express Adapter 1fc9 3015 Ethernet Adapter 4026 TN9610 10GbE SFP+ Ethernet Adapter 4027 TN9710P 10GBase-T/NBASE-T Ethernet Adapter + 1432 8104 10 Gigabit Ethernet PCI Express Adapter + 1fc9 3015 Ethernet Adapter 4527 TN9710Q 5GBase-T/NBASE-T Ethernet Adapter 1fcc StreamLabs f416 MS416 @@ -21748,6 +21840,7 @@ 0a26 Haswell-ULT Integrated Graphics Controller 0a2a Haswell-ULT Integrated Graphics Controller 0a2e Haswell-ULT Integrated Graphics Controller + 0a53 DC P3520 SSD 0be0 Atom Processor D2xxx/N2xxx Integrated Graphics Controller 0be1 Atom Processor D2xxx/N2xxx Integrated Graphics Controller 105b 0d7c D270S/D250S Motherboard @@ -22105,7 +22198,7 @@ 8086 1019 PRO/1000 CT Desktop Connection 8086 301f D865PERL mainboard 8086 3025 D875PBZ motherboard - 8086 302c Intel 82865G Mainboard (D865GBF) + 8086 302c D865GBF Mainboard 8086 3427 S875WP1-E mainboard 101a 82547EI Gigabit Ethernet Controller (Mobile) 8086 101a PRO/1000 CT Mobile Connection @@ -22303,7 +22396,7 @@ 1096 80003ES2LAN Gigabit Ethernet Controller (Copper) 15d9 1096 Motherboard 15d9 8680 X7DVL-E-O motherboard - 8086 3476 Intel S5000PSLSATA Server Board + 8086 3476 S5000PSLSATA Server Board 1097 631xESB/632xESB DPT LAN Controller (Fiber) 1098 80003ES2LAN Gigabit Ethernet Controller (Serdes) 1099 82546GB Gigabit Ethernet Controller (Copper) @@ -22457,6 +22550,7 @@ 103c 17d2 Ethernet 10Gb 2-port 560M Adapter 103c 18d0 Ethernet 10Gb 2-port 560FLB Adapter 1059 0111 T4007 10GbE interface + 1059 0130 T4009 10GbE interface 8086 000c Ethernet X520 10GbE Dual Port KX4-KR Mezz 10f9 82599 10 Gigabit Dual Port Network Connection 10fb 82599ES 10-Gigabit SFI/SFP+ Network Connection @@ -22862,6 +22956,7 @@ 1059 0110 T4005 1GbE interface 1059 0111 T4007 1GbE interface 1059 0120 T4008 1GbE interface + 1059 0130 T4009 1GbE interface 1538 I210 Gigabit Network Connection 1539 I211 Gigabit Network Connection 153a Ethernet Connection I217-LM @@ -23187,7 +23282,7 @@ 1a31 82845 845 [Brookdale] Chipset AGP Bridge 1a38 5000 Series Chipset DMA Engine 15d9 8680 X7DVL-E-O motherboard - 8086 3476 Intel S5000PSLSATA Server Board + 8086 3476 S5000PSLSATA Server Board 1a48 82597EX 10GbE Ethernet Controller 8086 a01f PRO/10GbE SR Server Adapter 8086 a11f PRO/10GbE SR Server Adapter @@ -24772,13 +24867,13 @@ 103c 31fe ProLiant DL140 G3 15d9 8680 X7DVL-E-O motherboard 15d9 9680 X7DBN Motherboard - 8086 3476 Intel S5000PSLSATA Server Board + 8086 3476 S5000PSLSATA Server Board 2680 631xESB/632xESB/3100 Chipset SATA IDE Controller 2681 631xESB/632xESB SATA AHCI Controller 103c 31fe ProLiant DL140 G3 15d9 8680 X7DVL-E-O motherboard 15d9 9680 X7DBN Motherboard - 8086 3476 Intel S5000PSLSATA Server Board + 8086 3476 S5000PSLSATA Server Board 2682 631xESB/632xESB SATA RAID Controller 103c 31fe Adaptec Serial ATA HostRAID 2683 631xESB/632xESB SATA RAID Controller @@ -24788,31 +24883,31 @@ 103c 31fe ProLiant DL140 G3 15d9 8680 X7DVL-E-O motherboard 15d9 9680 X7DBN Motherboard - 8086 3476 Intel S5000PSLSATA Server Board + 8086 3476 S5000PSLSATA Server Board 2689 631xESB/632xESB/3100 Chipset UHCI USB Controller #2 1028 01bb PowerEdge 1955 onboard USB 1028 01f0 PowerEdge R900 onboard USB 103c 31fe ProLiant DL140 G3 15d9 8680 X7DVL-E-O motherboard 15d9 9680 X7DBN Motherboard - 8086 3476 Intel S5000PSLSATA Server Board + 8086 3476 S5000PSLSATA Server Board 268a 631xESB/632xESB/3100 Chipset UHCI USB Controller #3 1028 01f0 PowerEdge R900 onboard USB 103c 31fe ProLiant DL140 G3 15d9 8680 X7DVL-E-O motherboard 15d9 9680 X7DBN Motherboard - 8086 3476 Intel S5000PSLSATA Server Board + 8086 3476 S5000PSLSATA Server Board 268b 631xESB/632xESB/3100 Chipset UHCI USB Controller #4 1028 01f0 PowerEdge R900 onboard USB 15d9 8680 X7DVL-E-O motherboard - 8086 3476 Intel S5000PSLSATA Server Board + 8086 3476 S5000PSLSATA Server Board 268c 631xESB/632xESB/3100 Chipset EHCI USB2 Controller 1028 01bb PowerEdge 1955 onboard USB 1028 01f0 PowerEdge R900 onboard USB 103c 31fe ProLiant DL140 G3 15d9 8680 X7DVL-E-O motherboard 15d9 9680 X7DBN Motherboard - 8086 3476 Intel S5000PSLSATA Server Board + 8086 3476 S5000PSLSATA Server Board 2690 631xESB/632xESB/3100 Chipset PCI Express Root Port 1 103c 31fe ProLiant DL140 G3 15d9 9680 X7DBN Motherboard @@ -24827,7 +24922,7 @@ 103c 31fe ProLiant DL140 G3 15d9 8680 X7DVL-E-O motherboard 15d9 9680 X7DBN Motherboard - 8086 3476 Intel S5000PSLSATA Server Board + 8086 3476 S5000PSLSATA Server Board 269e 631xESB/632xESB IDE Controller 103c 31fe ProLiant DL140 G3 15d9 8680 X7DVL-E-O motherboard @@ -24844,7 +24939,7 @@ 103c 2a3b Pavilion A1512X 1462 7418 Wind PC MS-7418 8086 544e DeskTop Board D945GTP - 8086 d605 Intel Desktop Board D945GCCR + 8086 d605 Desktop Board D945GCCR 2774 82955X Memory Controller Hub 2775 82955X PCI Express Root Port 2776 82945G/GZ Integrated Graphics Controller @@ -26205,8 +26300,7 @@ 8086 4010 Dual Band Wireless AC 3165 # Stone Peak 1x1 8086 4210 Dual Band Wireless AC 3165 -# Stone Peak 1x1 - 3166 Intel Dual Band Wireless-AC 3165 Plus Bluetooth + 3166 Dual Band Wireless-AC 3165 Plus Bluetooth 3200 GD31244 PCI-X SATA HBA 1775 c200 C2K onboard SATA host bus adapter 3310 IOP348 I/O Processor @@ -27032,6 +27126,7 @@ 530d 80310 (IOP) IO Processor 5845 QEMU NVM Express Controller 1af4 1100 QEMU Virtual Machine + 5902 HD Graphics 610 5a84 Celeron N3350/Pentium N4200/Atom E3900 Series Integrated Graphics Controller 5a88 Celeron N3350/Pentium N4200/Atom E3900 Series Imaging Unit 5a98 Celeron N3350/Pentium N4200/Atom E3900 Series Audio Cluster @@ -27909,7 +28004,23 @@ a252 Lewisburg SSATA Controller [AHCI mode] a256 Lewisburg SSATA Controller [RAID mode] a282 200 Series PCH SATA controller [AHCI mode] - a294 200 Series PCH PCI Express Root Port #1 + a286 200 Series PCH SATA controller [RAID mode] + a290 200 Series PCH PCI Express Root Port #1 + a291 200 Series PCH PCI Express Root Port #2 + a292 200 Series PCH PCI Express Root Port #3 + a293 200 Series PCH PCI Express Root Port #4 + a294 200 Series PCH PCI Express Root Port #5 + a295 200 Series PCH PCI Express Root Port #6 + a296 200 Series PCH PCI Express Root Port #7 + a297 200 Series PCH PCI Express Root Port #8 + a298 200 Series PCH PCI Express Root Port #9 + a299 200 Series PCH PCI Express Root Port #10 + a29a 200 Series PCH PCI Express Root Port #11 + a29b 200 Series PCH PCI Express Root Port #12 + a29c 200 Series PCH PCI Express Root Port #13 + a29d 200 Series PCH PCI Express Root Port #14 + a29e 200 Series PCH PCI Express Root Port #15 + a29f 200 Series PCH PCI Express Root Port #16 a2a1 200 Series PCH PMC a2a3 200 Series PCH SMBus Controller a2a7 200 Series PCH Serial IO UART Controller #0 @@ -27920,12 +28031,24 @@ a2b1 200 Series PCH Thermal Subsystem a2ba 200 Series PCH CSME HECI #1 a2bb 200 Series PCH CSME HECI #2 - a2c6 200 Series PCH LPC Controller + a2c4 200 Series PCH LPC Controller (H270) + a2c5 200 Series PCH LPC Controller (Z270) + a2c6 200 Series PCH LPC Controller (Q270) + a2c7 200 Series PCH LPC Controller (Q250) + a2c8 200 Series PCH LPC Controller (B250) a2e0 200 Series PCH Serial IO I2C Controller #0 a2e1 200 Series PCH Serial IO I2C Controller #1 a2e2 200 Series PCH Serial IO I2C Controller #2 a2e3 200 Series PCH Serial IO I2C Controller #3 a2e6 200 Series PCH Serial IO UART Controller #2 + a2e7 200 Series PCH PCI Express Root Port #17 + a2e8 200 Series PCH PCI Express Root Port #18 + a2e9 200 Series PCH PCI Express Root Port #19 + a2ea 200 Series PCH PCI Express Root Port #20 + a2eb 200 Series PCH PCI Express Root Port #21 + a2ec 200 Series PCH PCI Express Root Port #22 + a2ed 200 Series PCH PCI Express Root Port #23 + a2ee 200 Series PCH PCI Express Root Port #24 a2f0 200 Series PCH HD Audio a620 6400/6402 Advanced Memory Buffer (AMB) abc0 Omni-Path Fabric Switch Silicon 100 Series From owner-svn-src-stable-10@freebsd.org Sat Apr 1 11:24:36 2017 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0C154D291CA; Sat, 1 Apr 2017 11:24:36 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C368616A; Sat, 1 Apr 2017 11:24:35 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v31BOYn7011084; Sat, 1 Apr 2017 11:24:34 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v31BOYPQ011083; Sat, 1 Apr 2017 11:24:34 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201704011124.v31BOYPQ011083@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 1 Apr 2017 11:24:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r316354 - in stable: 10/contrib/libcxxrt 11/contrib/libcxxrt X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Apr 2017 11:24:36 -0000 Author: dim Date: Sat Apr 1 11:24:34 2017 New Revision: 316354 URL: https://svnweb.freebsd.org/changeset/base/316354 Log: MFC r315947: Import libcxxrt master 8a853717e61d5d55cbdf74d9d0a7545da5d5ff92. Interesting fixes which were not already merged: 0c7c611 Merge C++ demangler bug fixes from ELF Tool Chain (#40) 2b208d9 __cxa_demangle_gnu3: demangle 'z' as '...', not 'ellipsis' (#41) Modified: stable/10/contrib/libcxxrt/libelftc_dem_gnu3.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/11/contrib/libcxxrt/libelftc_dem_gnu3.c Directory Properties: stable/11/ (props changed) Modified: stable/10/contrib/libcxxrt/libelftc_dem_gnu3.c ============================================================================== --- stable/10/contrib/libcxxrt/libelftc_dem_gnu3.c Sat Apr 1 10:02:36 2017 (r316353) +++ stable/10/contrib/libcxxrt/libelftc_dem_gnu3.c Sat Apr 1 11:24:34 2017 (r316354) @@ -846,7 +846,7 @@ cpp_demangle_push_type_qualifier(struct free(buf); ++e_idx; break; - }; + } --idx; } @@ -1007,7 +1007,7 @@ cpp_demangle_read_expr_primary(struct cp return (cpp_demangle_push_str(ddata, "true", 4)); default: return (0); - }; + } case 'd': ++ddata->cur; @@ -1057,7 +1057,7 @@ cpp_demangle_read_expr_primary(struct cp default: return (0); - }; + } } static int @@ -1332,14 +1332,14 @@ cpp_demangle_read_expression(struct cpp_ /* operator sizeof */ ddata->cur += 2; return (cpp_demangle_read_expression_unary(ddata, "sizeof", 6)); - }; + } switch (*ddata->cur) { case 'L': return (cpp_demangle_read_expr_primary(ddata)); case 'T': return (cpp_demangle_read_tmpl_param(ddata)); - }; + } return (0); } @@ -1555,11 +1555,13 @@ cpp_demangle_read_encoding(struct cpp_de if (!cpp_demangle_push_str(ddata, "non-transaction clone for ", 26)) return (0); + break; case 't': default: if (!cpp_demangle_push_str(ddata, "transaction clone for ", 22)) return (0); + break; } ++ddata->cur; return (cpp_demangle_read_encoding(ddata)); @@ -1712,7 +1714,7 @@ cpp_demangle_read_encoding(struct cpp_de if (*ddata->cur == '\0') return (0); break; - }; + } return (cpp_demangle_read_name(ddata)); } @@ -1784,7 +1786,7 @@ cpp_demangle_read_name(struct cpp_demang return (cpp_demangle_read_nested_name(ddata)); case 'Z': return (cpp_demangle_read_local_name(ddata)); - }; + } if (!vector_str_init(&v)) return (0); @@ -1885,7 +1887,7 @@ cpp_demangle_read_nested_name(struct cpp case 'K': ddata->mem_cst = true; break; - }; + } ++ddata->cur; } @@ -1913,7 +1915,7 @@ cpp_demangle_read_nested_name(struct cpp default: if (!cpp_demangle_read_uqname(ddata)) goto clean; - }; + } if ((subst_str = vector_str_substr(output, p_idx, output->size - 1, &subst_str_len)) == NULL) @@ -2188,35 +2190,35 @@ cpp_demangle_read_subst(struct cpp_deman case SIMPLE_HASH('S', 'd'): /* std::basic_iostream > */ - if (!cpp_demangle_push_str(ddata, "std::iostream", 19)) + if (!cpp_demangle_push_str(ddata, "std::basic_iostream", 19)) return (0); - ddata->last_sname = "iostream"; + ddata->last_sname = "basic_iostream"; ddata->cur += 2; if (*ddata->cur == 'I') return (cpp_demangle_read_subst_stdtmpl(ddata, - "std::iostream", 19)); + "std::basic_iostream", 19)); return (1); case SIMPLE_HASH('S', 'i'): /* std::basic_istream > */ - if (!cpp_demangle_push_str(ddata, "std::istream", 18)) + if (!cpp_demangle_push_str(ddata, "std::basic_istream", 18)) return (0); - ddata->last_sname = "istream"; + ddata->last_sname = "basic_istream"; ddata->cur += 2; if (*ddata->cur == 'I') return (cpp_demangle_read_subst_stdtmpl(ddata, - "std::istream", 18)); + "std::basic_istream", 18)); return (1); case SIMPLE_HASH('S', 'o'): /* std::basic_ostream > */ - if (!cpp_demangle_push_str(ddata, "std::ostream", 18)) + if (!cpp_demangle_push_str(ddata, "std::basic_ostream", 18)) return (0); - ddata->last_sname = "istream"; + ddata->last_sname = "basic_ostream"; ddata->cur += 2; if (*ddata->cur == 'I') return (cpp_demangle_read_subst_stdtmpl(ddata, - "std::ostream", 18)); + "std::basic_ostream", 18)); return (1); case SIMPLE_HASH('S', 's'): @@ -2238,7 +2240,7 @@ cpp_demangle_read_subst(struct cpp_deman case SIMPLE_HASH('S', 't'): /* std:: */ return (cpp_demangle_read_subst_std(ddata)); - }; + } if (*(++ddata->cur) == '\0') return (0); @@ -2386,7 +2388,7 @@ cpp_demangle_read_tmpl_arg(struct cpp_de return (cpp_demangle_read_expr_primary(ddata)); case 'X': return (cpp_demangle_read_expression(ddata)); - }; + } return (cpp_demangle_read_type(ddata, 0)); } @@ -2863,11 +2865,11 @@ again: case 'z': /* ellipsis */ - if (!cpp_demangle_push_str(ddata, "ellipsis", 8)) + if (!cpp_demangle_push_str(ddata, "...", 3)) goto clean; ++ddata->cur; goto rtn; - }; + } if (!cpp_demangle_read_name(ddata)) goto clean; @@ -3331,7 +3333,7 @@ cpp_demangle_read_uqname(struct cpp_dema return (0); ddata->cur += 2; return (1); - }; + } /* vendor extened operator */ if (*ddata->cur == 'v' && ELFTC_ISDIGIT(*(ddata->cur + 1))) { @@ -3377,7 +3379,7 @@ cpp_demangle_read_uqname(struct cpp_dema return (0); ddata->cur +=2; return (1); - }; + } /* source name */ if (ELFTC_ISDIGIT(*ddata->cur) != 0) @@ -3740,7 +3742,7 @@ hex_to_dec(char c) return (15); default: return (-1); - }; + } } static void