From owner-svn-src-all@freebsd.org Sat May 21 11:10:50 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8C403B44DC3; Sat, 21 May 2016 11:10:50 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 45CDE1DC8; Sat, 21 May 2016 11:10:50 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u4LBAngc007430; Sat, 21 May 2016 11:10:49 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u4LBAne2007426; Sat, 21 May 2016 11:10:49 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201605211110.u4LBAne2007426@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sat, 21 May 2016 11:10:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r300369 - in head/sys/dev: cxgbe/cxgbei iscsi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 May 2016 11:10:50 -0000 Author: trasz Date: Sat May 21 11:10:48 2016 New Revision: 300369 URL: https://svnweb.freebsd.org/changeset/base/300369 Log: Provide a way for ICL modules to declare they support PIM_UNMAPPED. MFC after: 1 month Sponsored by: The FreeBSD Foundation Modified: head/sys/dev/cxgbe/cxgbei/icl_cxgbei.c head/sys/dev/iscsi/icl.h head/sys/dev/iscsi/icl_soft.c head/sys/dev/iscsi/iscsi.c Modified: head/sys/dev/cxgbe/cxgbei/icl_cxgbei.c ============================================================================== --- head/sys/dev/cxgbe/cxgbei/icl_cxgbei.c Sat May 21 10:59:36 2016 (r300368) +++ head/sys/dev/cxgbe/cxgbei/icl_cxgbei.c Sat May 21 11:10:48 2016 (r300369) @@ -429,6 +429,7 @@ icl_cxgbei_new_conn(const char *name, st 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); Modified: head/sys/dev/iscsi/icl.h ============================================================================== --- head/sys/dev/iscsi/icl.h Sat May 21 10:59:36 2016 (r300368) +++ head/sys/dev/iscsi/icl.h Sat May 21 11:10:48 2016 (r300369) @@ -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; Modified: head/sys/dev/iscsi/icl_soft.c ============================================================================== --- head/sys/dev/iscsi/icl_soft.c Sat May 21 10:59:36 2016 (r300368) +++ head/sys/dev/iscsi/icl_soft.c Sat May 21 11:10:48 2016 (r300369) @@ -1190,6 +1190,7 @@ icl_soft_new_conn(const char *name, stru 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); } Modified: head/sys/dev/iscsi/iscsi.c ============================================================================== --- head/sys/dev/iscsi/iscsi.c Sat May 21 10:59:36 2016 (r300368) +++ head/sys/dev/iscsi/iscsi.c Sat May 21 11:10:48 2016 (r300369) @@ -2266,6 +2266,14 @@ iscsi_action(struct cam_sim *sim, union 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; /*