aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/isp
diff options
context:
space:
mode:
authorAlexander Motin <mav@FreeBSD.org>2017-03-12 14:17:57 +0000
committerAlexander Motin <mav@FreeBSD.org>2017-03-12 14:17:57 +0000
commit229203af6865e153ce0b3f8a15c19a37b49f34f3 (patch)
treef7faa3f28574356a8e4f2a26a659addcdfdaddc4 /sys/dev/isp
parent9a2dde80130868c0d30a98f5a0b299aee95841e5 (diff)
Notes
Diffstat (limited to 'sys/dev/isp')
-rw-r--r--sys/dev/isp/isp.c16
-rw-r--r--sys/dev/isp/isp_freebsd.c26
-rw-r--r--sys/dev/isp/isp_freebsd.h5
-rw-r--r--sys/dev/isp/isp_target.c6
4 files changed, 1 insertions, 52 deletions
diff --git a/sys/dev/isp/isp.c b/sys/dev/isp/isp.c
index 511824c3b0a0d..1d1b7ab4e0989 100644
--- a/sys/dev/isp/isp.c
+++ b/sys/dev/isp/isp.c
@@ -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;
diff --git a/sys/dev/isp/isp_freebsd.c b/sys/dev/isp/isp_freebsd.c
index 4a646d74cd30c..9ac91ebb07328 100644
--- a/sys/dev/isp/isp_freebsd.c
+++ b/sys/dev/isp/isp_freebsd.c
@@ -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,
diff --git a/sys/dev/isp/isp_freebsd.h b/sys/dev/isp/isp_freebsd.h
index b540c77ce14f1..562d82f1df381 100644
--- a/sys/dev/isp/isp_freebsd.h
+++ b/sys/dev/isp/isp_freebsd.h
@@ -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
diff --git a/sys/dev/isp/isp_target.c b/sys/dev/isp/isp_target.c
index f86792ec86fcb..90d439ef926ea 100644
--- a/sys/dev/isp/isp_target.c
+++ b/sys/dev/isp/isp_target.c
@@ -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;
}