From owner-svn-src-stable@freebsd.org Fri Nov 13 19:44:00 2015 Return-Path: Delivered-To: svn-src-stable@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 93545A2E835; Fri, 13 Nov 2015 19:44:00 +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 678311F2B; Fri, 13 Nov 2015 19:44:00 +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 tADJhxeg095574; Fri, 13 Nov 2015 19:43:59 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tADJhx87095571; Fri, 13 Nov 2015 19:43:59 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201511131943.tADJhx87095571@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 13 Nov 2015 19:43: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: r290786 - 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@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Nov 2015 19:44:00 -0000 Author: mav Date: Fri Nov 13 19:43:58 2015 New Revision: 290786 URL: https://svnweb.freebsd.org/changeset/base/290786 Log: MFC r289817: Disable full bus scan by CAM for FC adapters. FC port database code already notifies CAM about all devices. Additional full scan is just a waste of time, that by definition won't find anything that is not present in port database. Modified: stable/10/sys/dev/isp/isp_freebsd.c stable/10/sys/dev/isp/isp_freebsd.h stable/10/sys/dev/isp/isp_pci.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/isp/isp_freebsd.c ============================================================================== --- stable/10/sys/dev/isp/isp_freebsd.c Fri Nov 13 19:42:55 2015 (r290785) +++ stable/10/sys/dev/isp/isp_freebsd.c Fri Nov 13 19:43:58 2015 (r290786) @@ -54,7 +54,6 @@ int isp_fabric_hysteresis = 5; int isp_loop_down_limit = 60; /* default loop down limit */ int isp_quickboot_time = 7; /* don't wait more than N secs for loop up */ int isp_gone_device_time = 30; /* grace time before reporting device lost */ -int isp_autoconfig = 1; /* automatically attach/detach devices */ static const char prom3[] = "Chan %d [%u] PortID 0x%06x Departed because of %s"; static void isp_freeze_loopdown(ispsoftc_t *, int, char *); @@ -418,6 +417,9 @@ isp_freeze_loopdown(ispsoftc_t *isp, int if (fc->simqfrozen == 0) { isp_prt(isp, ISP_LOGDEBUG0, "%s: freeze simq (loopdown) chan %d", msg, 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, "%s: mark frozen (loopdown) chan %d", msg, chan); @@ -436,6 +438,9 @@ isp_unfreeze_loopdown(ispsoftc_t *isp, i if (wasfrozen && fc->simqfrozen == 0) { isp_prt(isp, ISP_LOG_SANCFG|ISP_LOGDEBUG0, "%s: Chan %d releasing simq", __func__, chan); xpt_release_simq(fc->sim, 1); +#if __FreeBSD_version >= 1000039 + xpt_release_boot(); +#endif } } } @@ -4602,10 +4607,6 @@ isp_make_here(ispsoftc_t *isp, fcportdb_ union ccb *ccb; struct isp_fc *fc = ISP_FC_PC(isp, chan); - if (isp_autoconfig == 0) { - return; - } - /* * Allocate a CCB, create a wildcard path for this target and schedule a rescan. */ @@ -4629,9 +4630,6 @@ isp_make_gone(ispsoftc_t *isp, fcportdb_ struct cam_path *tp; struct isp_fc *fc = ISP_FC_PC(isp, chan); - if (isp_autoconfig == 0) { - return; - } if (xpt_create_path(&tp, NULL, cam_sim_path(fc->sim), tgt, CAM_LUN_WILDCARD) == CAM_REQ_CMP) { xpt_async(AC_LOST_DEVICE, tp, NULL); xpt_free_path(tp); @@ -5516,6 +5514,9 @@ isp_action(struct cam_sim *sim, union cc fcparam *fcp = FCPARAM(isp, bus); cpi->hba_misc = PIM_NOBUSRESET | PIM_UNMAPPED; +#if __FreeBSD_version >= 1000039 + cpi->hba_misc |= PIM_NOSCAN; +#endif /* * 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 Fri Nov 13 19:42:55 2015 (r290785) +++ stable/10/sys/dev/isp/isp_freebsd.h Fri Nov 13 19:43:58 2015 (r290786) @@ -734,7 +734,6 @@ extern int isp_fabric_hysteresis; extern int isp_loop_down_limit; extern int isp_gone_device_time; extern int isp_quickboot_time; -extern int isp_autoconfig; /* * Platform private flags Modified: stable/10/sys/dev/isp/isp_pci.c ============================================================================== --- stable/10/sys/dev/isp/isp_pci.c Fri Nov 13 19:42:55 2015 (r290785) +++ stable/10/sys/dev/isp/isp_pci.c Fri Nov 13 19:43:58 2015 (r290786) @@ -489,9 +489,6 @@ isp_get_generic_options(device_t dev, is if (tval > 0 && tval < 127) { isp_nvports = tval; } - tval = 1; - (void) resource_int_value(device_get_name(dev), device_get_unit(dev), "autoconfig", &tval); - isp_autoconfig = tval; tval = 7; (void) resource_int_value(device_get_name(dev), device_get_unit(dev), "quickboot_time", &tval); isp_quickboot_time = tval;