aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/iscsi/iscsi.c
diff options
context:
space:
mode:
authorEdward Tomasz Napierala <trasz@FreeBSD.org>2016-05-21 11:10:48 +0000
committerEdward Tomasz Napierala <trasz@FreeBSD.org>2016-05-21 11:10:48 +0000
commit7deb68ab2cb341ac1378440397e89129c9c43f4a (patch)
tree5335938a73e260798ba62c098b453a0ebd8046fe /sys/dev/iscsi/iscsi.c
parentb218ca6fdd64e6549a7279b942c5466a945a207e (diff)
downloadsrc-7deb68ab2cb341ac1378440397e89129c9c43f4a.tar.gz
src-7deb68ab2cb341ac1378440397e89129c9c43f4a.zip
Provide a way for ICL modules to declare they support PIM_UNMAPPED.
MFC after: 1 month Sponsored by: The FreeBSD Foundation
Notes
Notes: svn path=/head/; revision=300369
Diffstat (limited to 'sys/dev/iscsi/iscsi.c')
-rw-r--r--sys/dev/iscsi/iscsi.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/sys/dev/iscsi/iscsi.c b/sys/dev/iscsi/iscsi.c
index d408bec8b88d..d72768ffc3f8 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;
/*