From owner-svn-src-stable@freebsd.org Thu Jan 5 11:30:25 2017 Return-Path: Delivered-To: svn-src-stable@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 AA4CBC9FE03; Thu, 5 Jan 2017 11:30:25 +0000 (UTC) (envelope-from mav@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 5FC0617DE; Thu, 5 Jan 2017 11:30:25 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v05BUOjG049345; Thu, 5 Jan 2017 11:30:24 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v05BUOK1049344; Thu, 5 Jan 2017 11:30:24 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201701051130.v05BUOK1049344@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Thu, 5 Jan 2017 11:30:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r311409 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jan 2017 11:30:25 -0000 Author: mav Date: Thu Jan 5 11:30:24 2017 New Revision: 311409 URL: https://svnweb.freebsd.org/changeset/base/311409 Log: MFC r310266: Add support for NUAR bit in Control mode page. Modified: stable/10/sys/cam/ctl/ctl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Thu Jan 5 11:29:42 2017 (r311408) +++ stable/10/sys/cam/ctl/ctl.c Thu Jan 5 11:30:24 2017 (r311409) @@ -253,7 +253,7 @@ const static struct scsi_control_page co /*page_code*/SMS_CONTROL_MODE_PAGE, /*page_length*/sizeof(struct scsi_control_page) - 2, /*rlec*/SCP_DSENSE, - /*queue_flags*/SCP_QUEUE_ALG_MASK, + /*queue_flags*/SCP_QUEUE_ALG_MASK | SCP_NUAR, /*eca_and_aen*/SCP_SWP, /*flags4*/0, /*aen_holdoff_period*/{0, 0}, @@ -8431,12 +8431,11 @@ ctl_persistent_reserve_out(struct ctl_sc lun->pr_res_type = 0; /* - * if this isn't an exclusive access - * res generate UA for all other - * registrants. + * If this isn't an exclusive access reservation and NUAR + * is not set, generate UA for all other registrants. */ - if (type != SPR_TYPE_EX_AC - && type != SPR_TYPE_WR_EX) { + if (type != SPR_TYPE_EX_AC && type != SPR_TYPE_WR_EX && + (lun->MODE_CTRL.queue_flags & SCP_NUAR) == 0) { for (i = softc->init_min; i < softc->init_max; i++) { if (i == residx || ctl_get_prkey(lun, i) == 0) continue; @@ -8586,11 +8585,12 @@ ctl_hndl_per_res_out_on_other_sc(union c case CTL_PR_RELEASE: /* - * if this isn't an exclusive access res generate UA for all - * other registrants. + * If this isn't an exclusive access reservation and NUAR + * is not set, generate UA for all other registrants. */ if (lun->pr_res_type != SPR_TYPE_EX_AC && - lun->pr_res_type != SPR_TYPE_WR_EX) { + lun->pr_res_type != SPR_TYPE_WR_EX && + (lun->MODE_CTRL.queue_flags & SCP_NUAR) == 0) { for (i = softc->init_min; i < softc->init_max; i++) if (i == residx || ctl_get_prkey(lun, i) == 0) continue;