svn commit: r315978 - stable/10/sys/dev/isp
Alexander Motin
mav at FreeBSD.org
Sun Mar 26 08:52:46 UTC 2017
Author: mav
Date: Sun Mar 26 08:52:44 2017
New Revision: 315978
URL: https://svnweb.freebsd.org/changeset/base/315978
Log:
MFC r315160: Remove code for unsupported FreeBSD versions.
Modified:
stable/10/sys/dev/isp/isp.c
stable/10/sys/dev/isp/isp_freebsd.c
stable/10/sys/dev/isp/isp_freebsd.h
stable/10/sys/dev/isp/isp_target.c
Directory Properties:
stable/10/ (props changed)
Modified: stable/10/sys/dev/isp/isp.c
==============================================================================
--- stable/10/sys/dev/isp/isp.c Sun Mar 26 08:52:14 2017 (r315977)
+++ stable/10/sys/dev/isp/isp.c Sun Mar 26 08:52:44 2017 (r315978)
@@ -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;
Modified: stable/10/sys/dev/isp/isp_freebsd.c
==============================================================================
--- stable/10/sys/dev/isp/isp_freebsd.c Sun Mar 26 08:52:14 2017 (r315977)
+++ stable/10/sys/dev/isp/isp_freebsd.c Sun Mar 26 08:52:44 2017 (r315978)
@@ -369,9 +369,7 @@ isp_freeze_loopdown(ispsoftc_t *isp, int
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,
@@ -392,9 +390,7 @@ isp_unfreeze_loopdown(ispsoftc_t *isp, i
isp_prt(isp, ISP_LOGDEBUG0,
"Chan %d Release simq", chan);
xpt_release_simq(fc->sim, 1);
-#if __FreeBSD_version >= 1000039
xpt_release_boot();
-#endif
}
}
}
@@ -1692,10 +1688,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;
}
@@ -1744,9 +1736,6 @@ isp_handle_platform_atio2(ispsoftc_t *is
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;
}
@@ -1882,12 +1871,7 @@ isp_handle_platform_atio7(ispsoftc_t *is
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.
@@ -2375,9 +2359,6 @@ isp_handle_platform_notify_fc(ispsoftc_t
if (ISP_CAP_SCCFW(isp)) {
lun = inp->in_scclun;
-#if __FreeBSD_version < 1000700
- lun &= 0x3fff;
-#endif
} else {
lun = inp->in_lun;
}
@@ -3834,12 +3815,7 @@ isp_action(struct cam_sim *sim, union cc
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,
Modified: stable/10/sys/dev/isp/isp_freebsd.h
==============================================================================
--- stable/10/sys/dev/isp/isp_freebsd.h Sun Mar 26 08:52:14 2017 (r315977)
+++ stable/10/sys/dev/isp/isp_freebsd.h Sun Mar 26 08:52:44 2017 (r315978)
@@ -382,13 +382,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
Modified: stable/10/sys/dev/isp/isp_target.c
==============================================================================
--- stable/10/sys/dev/isp/isp_target.c Sun Mar 26 08:52:14 2017 (r315977)
+++ stable/10/sys/dev/isp/isp_target.c Sun Mar 26 08:52:44 2017 (r315978)
@@ -726,9 +726,6 @@ isp_got_msg_fc(ispsoftc_t *isp, in_fcent
/* 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_en
if (ISP_CAP_SCCFW(isp)) {
lun = aep->at_scclun;
-#if __FreeBSD_version < 1000700
- lun &= 0x3fff;
-#endif
} else {
lun = aep->at_lun;
}
More information about the svn-src-stable-10
mailing list