1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-29 16:44:03 +00:00

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
This commit is contained in:
Kenneth D. Merry 2014-05-08 20:46:46 +00:00
parent d2b4e18b21
commit a371d6f964
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=265712
2 changed files with 10 additions and 5 deletions

View File

@ -183,7 +183,8 @@ mprsas_startup_increment(struct mprsas_softc *sassc)
/* 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_softc *sassc)
"%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 ccb *ccb)
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;

View File

@ -801,7 +801,8 @@ mprsas_add_device(struct mpr_softc *sc, u16 handle, u8 linkrate){
"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, u16 handle)
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);