From owner-svn-src-all@freebsd.org Tue Oct 20 01:54:35 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 9DA7EA19CD6; Tue, 20 Oct 2015 01:54:35 +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 69A05EE1; Tue, 20 Oct 2015 01:54:35 +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 t9K1sYS6031062; Tue, 20 Oct 2015 01:54:34 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9K1sYq6031061; Tue, 20 Oct 2015 01:54:34 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201510200154.t9K1sYq6031061@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Tue, 20 Oct 2015 01:54:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289615 - head/sys/dev/ntb/if_ntb 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: Tue, 20 Oct 2015 01:54:35 -0000 Author: cem Date: Tue Oct 20 01:54:34 2015 New Revision: 289615 URL: https://svnweb.freebsd.org/changeset/base/289615 Log: if_ntb: Fix typo in qp_link_work to match Linux Throw away the result of the peer SPAD read. The peer will write our local SPAD and we need to keep the locally read SPAD value to check if the remote side is up. Sponsored by: EMC / Isilon Storage Division Modified: head/sys/dev/ntb/if_ntb/if_ntb.c Modified: head/sys/dev/ntb/if_ntb/if_ntb.c ============================================================================== --- head/sys/dev/ntb/if_ntb/if_ntb.c Tue Oct 20 01:54:25 2015 (r289614) +++ head/sys/dev/ntb/if_ntb/if_ntb.c Tue Oct 20 01:54:34 2015 (r289615) @@ -1381,14 +1381,14 @@ ntb_qp_link_work(void *arg) struct ntb_transport_qp *qp = arg; struct ntb_softc *ntb = qp->ntb; struct ntb_transport_ctx *nt = qp->transport; - int val; + uint32_t val, dummy; ntb_spad_read(ntb, IF_NTB_QP_LINKS, &val); ntb_peer_spad_write(ntb, IF_NTB_QP_LINKS, val | (1ull << qp->qp_num)); /* query remote spad for qp ready bits */ - ntb_peer_spad_read(ntb, IF_NTB_QP_LINKS, &val); + ntb_peer_spad_read(ntb, IF_NTB_QP_LINKS, &dummy); /* See if the remote side is up */ if ((val & (1ull << qp->qp_num)) != 0) {