aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorAlexander Motin <mav@FreeBSD.org>2015-10-23 08:53:32 +0000
committerAlexander Motin <mav@FreeBSD.org>2015-10-23 08:53:32 +0000
commitc07b9e0752d067d9a20a057abed026e6671d20ad (patch)
treebe778bc106739750697753d4963d155c225e84e7 /sys
parent74ee6e03d043043ddcb6e1335f9369acd100c403 (diff)
downloadsrc-c07b9e0752d067d9a20a057abed026e6671d20ad.tar.gz
src-c07b9e0752d067d9a20a057abed026e6671d20ad.zip
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.
Notes
Notes: svn path=/head/; revision=289817
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/isp/isp_freebsd.c17
-rw-r--r--sys/dev/isp/isp_freebsd.h1
-rw-r--r--sys/dev/isp/isp_pci.c3
3 files changed, 9 insertions, 12 deletions
diff --git a/sys/dev/isp/isp_freebsd.c b/sys/dev/isp/isp_freebsd.c
index b072101c1b81..4581dc1a668c 100644
--- a/sys/dev/isp/isp_freebsd.c
+++ b/sys/dev/isp/isp_freebsd.c
@@ -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 chan, char *msg)
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, int chan)
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
}
}
}
@@ -4596,10 +4601,6 @@ isp_make_here(ispsoftc_t *isp, fcportdb_t *fcp, int chan, int tgt)
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.
*/
@@ -4623,9 +4624,6 @@ isp_make_gone(ispsoftc_t *isp, fcportdb_t *fcp, int chan, int tgt)
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);
@@ -5510,6 +5508,9 @@ isp_action(struct cam_sim *sim, union ccb *ccb)
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,
diff --git a/sys/dev/isp/isp_freebsd.h b/sys/dev/isp/isp_freebsd.h
index bca0f7c7d84a..23ae39c66f6b 100644
--- a/sys/dev/isp/isp_freebsd.h
+++ b/sys/dev/isp/isp_freebsd.h
@@ -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
diff --git a/sys/dev/isp/isp_pci.c b/sys/dev/isp/isp_pci.c
index 96eabc7a472d..9f8c82dc41d0 100644
--- a/sys/dev/isp/isp_pci.c
+++ b/sys/dev/isp/isp_pci.c
@@ -489,9 +489,6 @@ isp_get_generic_options(device_t dev, ispsoftc_t *isp)
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;