From owner-svn-src-all@freebsd.org Mon Oct 19 17:41:24 2015 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 37396A18D76; Mon, 19 Oct 2015 17:41:24 +0000 (UTC) (envelope-from cem@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 F25A1902; Mon, 19 Oct 2015 17:41:23 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9JHfM1X074044; Mon, 19 Oct 2015 17:41:22 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9JHfMgC074043; Mon, 19 Oct 2015 17:41:22 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201510191741.t9JHfMgC074043@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Mon, 19 Oct 2015 17:41:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289596 - head/sys/dev/ntb/ntb_hw 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.20 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: Mon, 19 Oct 2015 17:41:24 -0000 Author: cem Date: Mon Oct 19 17:41:22 2015 New Revision: 289596 URL: https://svnweb.freebsd.org/changeset/base/289596 Log: NTB: Add ntb_mw_clear_trans() missed in r289546 It is just a trivial wrapper around ntb_mw_set_trans(). Authored by: Allen Hubbe Obtained from: Linux (Dual BSD/GPL driver) Sponsored by: EMC / Isilon Storage Division Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.c Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.c ============================================================================== --- head/sys/dev/ntb/ntb_hw/ntb_hw.c Mon Oct 19 17:31:51 2015 (r289595) +++ head/sys/dev/ntb/ntb_hw/ntb_hw.c Mon Oct 19 17:41:22 2015 (r289596) @@ -2117,6 +2117,23 @@ ntb_mw_set_trans(struct ntb_softc *ntb, return (0); } +/* + * ntb_mw_clear_trans() - clear the translation of a memory window + * @ntb: NTB device context + * @idx: Memory window number + * + * Clear the translation of a memory window. The peer may no longer access + * local memory through the window. + * + * Return: Zero on success, otherwise an error number. + */ +int +ntb_mw_clear_trans(struct ntb_softc *ntb, unsigned mw_idx) +{ + + return (ntb_mw_set_trans(ntb, mw_idx, 0, 0)); +} + /** * ntb_peer_db_set() - Set the doorbell on the secondary/external side * @ntb: pointer to ntb_softc instance