summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortrasz <trasz@FreeBSD.org>2016-05-21 11:10:48 +0000
committertrasz <trasz@FreeBSD.org>2016-05-21 11:10:48 +0000
commitfe581d2d785d052bb0f63e2bfe73092b3eb7595b (patch)
tree5335938a73e260798ba62c098b453a0ebd8046fe
parent3d5b692acb58bd43e5bebbd0ee21fe631156387b (diff)
downloadFreeBSD-src-fe581d2d785d052bb0f63e2bfe73092b3eb7595b.zip
FreeBSD-src-fe581d2d785d052bb0f63e2bfe73092b3eb7595b.tar.gz
Provide a way for ICL modules to declare they support PIM_UNMAPPED.
MFC after: 1 month Sponsored by: The FreeBSD Foundation
-rw-r--r--sys/dev/cxgbe/cxgbei/icl_cxgbei.c1
-rw-r--r--sys/dev/iscsi/icl.h1
-rw-r--r--sys/dev/iscsi/icl_soft.c1
-rw-r--r--sys/dev/iscsi/iscsi.c8
4 files changed, 11 insertions, 0 deletions
diff --git a/sys/dev/cxgbe/cxgbei/icl_cxgbei.c b/sys/dev/cxgbe/cxgbei/icl_cxgbei.c
index 6332747..07a1f22 100644
--- a/sys/dev/cxgbe/cxgbei/icl_cxgbei.c
+++ b/sys/dev/cxgbe/cxgbei/icl_cxgbei.c
@@ -429,6 +429,7 @@ icl_cxgbei_new_conn(const char *name, struct mtx *lock)
ic->ic_max_data_segment_length = CXGBEI_MAX_DSL;
ic->ic_name = name;
ic->ic_offload = "cxgbei";
+ ic->ic_unmapped = false;
CTR2(KTR_CXGBE, "%s: icc %p", __func__, icc);
diff --git a/sys/dev/iscsi/icl.h b/sys/dev/iscsi/icl.h
index d0f822d..29d1153 100644
--- a/sys/dev/iscsi/icl.h
+++ b/sys/dev/iscsi/icl.h
@@ -113,6 +113,7 @@ struct icl_conn {
size_t ic_maxtags;
bool ic_disconnecting;
bool ic_iser;
+ bool ic_unmapped;
const char *ic_name;
const char *ic_offload;
diff --git a/sys/dev/iscsi/icl_soft.c b/sys/dev/iscsi/icl_soft.c
index 84fecb6..c38493f 100644
--- a/sys/dev/iscsi/icl_soft.c
+++ b/sys/dev/iscsi/icl_soft.c
@@ -1190,6 +1190,7 @@ icl_soft_new_conn(const char *name, struct mtx *lock)
ic->ic_max_data_segment_length = ICL_MAX_DATA_SEGMENT_LENGTH;
ic->ic_name = name;
ic->ic_offload = "None";
+ ic->ic_unmapped = false;
return (ic);
}
diff --git a/sys/dev/iscsi/iscsi.c b/sys/dev/iscsi/iscsi.c
index d408bec..d72768f 100644
--- a/sys/dev/iscsi/iscsi.c
+++ b/sys/dev/iscsi/iscsi.c
@@ -2266,6 +2266,14 @@ iscsi_action(struct cam_sim *sim, union ccb *ccb)
cpi->hba_inquiry = PI_TAG_ABLE;
cpi->target_sprt = 0;
cpi->hba_misc = PIM_EXTLUNS;
+ /*
+ * XXX: It shouldn't ever be NULL; this could be turned
+ * into a KASSERT eventually.
+ */
+ if (is->is_conn == NULL)
+ ISCSI_WARN("NULL conn");
+ else if (is->is_conn->ic_unmapped)
+ cpi->hba_misc |= PIM_UNMAPPED;
cpi->hba_eng_cnt = 0;
cpi->max_target = 0;
/*
OpenPOWER on IntegriCloud