svn commit: r265712 - head/sys/dev/mpr
Kenneth D. Merry
ken at FreeBSD.org
Thu May 8 20:46:47 UTC 2014
Author: ken
Date: Thu May 8 20:46:46 2014
New Revision: 265712
URL: http://svnweb.freebsd.org/changeset/base/265712
Log:
Add #ifdefs in the mpr(4) driver so that versions of stable/9 that
have implemented the PIM_NOSCAN rescan functionality will have it
enabled.
This is a no-op for head.
Reviewed by: slm
Sponsored by: Spectra Logic Corporation
MFC after: 3 days
Modified:
head/sys/dev/mpr/mpr_sas.c
head/sys/dev/mpr/mpr_sas_lsi.c
Modified: head/sys/dev/mpr/mpr_sas.c
==============================================================================
--- head/sys/dev/mpr/mpr_sas.c Thu May 8 20:41:39 2014 (r265711)
+++ head/sys/dev/mpr/mpr_sas.c Thu May 8 20:46:46 2014 (r265712)
@@ -183,7 +183,8 @@ mprsas_startup_increment(struct mprsas_s
/* just starting, freeze the simq */
mpr_dprint(sassc->sc, MPR_INIT,
"%s freezing simq\n", __func__);
-#if __FreeBSD_version >= 1000039
+#if (__FreeBSD_version >= 1000039) || \
+ ((__FreeBSD_version < 1000000) && (__FreeBSD_version >= 902502))
xpt_hold_boot();
#endif
xpt_freeze_simq(sassc->sim, 1);
@@ -217,7 +218,8 @@ mprsas_startup_decrement(struct mprsas_s
"%s releasing simq\n", __func__);
sassc->flags &= ~MPRSAS_IN_STARTUP;
xpt_release_simq(sassc->sim, 1);
-#if __FreeBSD_version >= 1000039
+#if (__FreeBSD_version >= 1000039) || \
+ ((__FreeBSD_version < 1000000) && (__FreeBSD_version >= 902502))
xpt_release_boot();
#else
mprsas_rescan_target(sassc->sc, NULL);
@@ -974,7 +976,8 @@ mprsas_action(struct cam_sim *sim, union
cpi->version_num = 1;
cpi->hba_inquiry = PI_SDTR_ABLE|PI_TAG_ABLE|PI_WIDE_16;
cpi->target_sprt = 0;
-#if __FreeBSD_version >= 1000039
+#if (__FreeBSD_version >= 1000039) || \
+ ((__FreeBSD_version < 1000000) && (__FreeBSD_version >= 902502))
cpi->hba_misc = PIM_NOBUSRESET | PIM_UNMAPPED | PIM_NOSCAN;
#else
cpi->hba_misc = PIM_NOBUSRESET | PIM_UNMAPPED;
Modified: head/sys/dev/mpr/mpr_sas_lsi.c
==============================================================================
--- head/sys/dev/mpr/mpr_sas_lsi.c Thu May 8 20:41:39 2014 (r265711)
+++ head/sys/dev/mpr/mpr_sas_lsi.c Thu May 8 20:46:46 2014 (r265712)
@@ -801,7 +801,8 @@ mprsas_add_device(struct mpr_softc *sc,
"and connector name (%4s)\n", targ->encl_level,
targ->connector_name);
}
-#if __FreeBSD_version < 1000039
+#if ((__FreeBSD_version >= 1000000) && (__FreeBSD_version < 1000039)) || \
+ (__FreeBSD_version < 902502)
if ((sassc->flags & MPRSAS_IN_STARTUP) == 0)
#endif
mprsas_rescan_target(sc, targ);
@@ -992,7 +993,8 @@ mprsas_volume_add(struct mpr_softc *sc,
free(lun, M_MPR);
}
SLIST_INIT(&targ->luns);
-#if __FreeBSD_version < 1000039
+#if ((__FreeBSD_version >= 1000000) && (__FreeBSD_version < 1000039)) || \
+ (__FreeBSD_version < 902502)
if ((sassc->flags & MPRSAS_IN_STARTUP) == 0)
#endif
mprsas_rescan_target(sc, targ);
More information about the svn-src-head
mailing list