Remove code for unsupported FreeBSD versions.

MFC after:	2 weeks
This commit is contained in:
Alexander Motin 2017-03-12 14:17:57 +00:00
parent 9a2dde8013
commit 229203af68
4 changed files with 1 additions and 52 deletions

View file

@ -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;

View file

@ -391,9 +391,7 @@ isp_freeze_loopdown(ispsoftc_t *isp, int chan)
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,
@ -414,9 +412,7 @@ isp_unfreeze_loopdown(ispsoftc_t *isp, int chan)
isp_prt(isp, ISP_LOGDEBUG0,
"Chan %d Release simq", chan);
xpt_release_simq(fc->sim, 1);
#if __FreeBSD_version >= 1000039
xpt_release_boot();
#endif
}
}
}
@ -1736,10 +1732,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;
}
@ -1788,9 +1780,6 @@ isp_handle_platform_atio2(ispsoftc_t *isp, at2_entry_t *aep)
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;
}
@ -1926,12 +1915,7 @@ isp_handle_platform_atio7(ispsoftc_t *isp, at7_entry_t *aep)
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.
@ -2419,9 +2403,6 @@ isp_handle_platform_notify_fc(ispsoftc_t *isp, in_fcentry_t *inp)
if (ISP_CAP_SCCFW(isp)) {
lun = inp->in_scclun;
#if __FreeBSD_version < 1000700
lun &= 0x3fff;
#endif
} else {
lun = inp->in_lun;
}
@ -3879,12 +3860,7 @@ isp_action(struct cam_sim *sim, union ccb *ccb)
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,

View file

@ -384,13 +384,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

View file

@ -726,9 +726,6 @@ isp_got_msg_fc(ispsoftc_t *isp, in_fcentry_t *inp)
/* 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_entry_t *aep)
if (ISP_CAP_SCCFW(isp)) {
lun = aep->at_scclun;
#if __FreeBSD_version < 1000700
lun &= 0x3fff;
#endif
} else {
lun = aep->at_lun;
}