From owner-svn-src-all@freebsd.org Sat Jul 9 09:34:25 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 E6183B85D72; Sat, 9 Jul 2016 09:34: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 B6CC4157D; Sat, 9 Jul 2016 09:34: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 u699YOLk045736; Sat, 9 Jul 2016 09:34:24 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u699YOoa045735; Sat, 9 Jul 2016 09:34:24 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201607090934.u699YOoa045735@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sat, 9 Jul 2016 09:34:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302482 - 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.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, 09 Jul 2016 09:34:26 -0000 Author: mav Date: Sat Jul 9 09:34:24 2016 New Revision: 302482 URL: https://svnweb.freebsd.org/changeset/base/302482 Log: Fix NTB_SDOORBELL_LOCKUP workaround. Since SBARxSZ register can be write-once, it can be unusable for disabling the SBAR. For such case also set SBARxBASE to zero to not intersect with config BAR. 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 Sat Jul 9 06:52:55 2016 (r302481) +++ head/sys/dev/ntb/ntb_hw/ntb_hw.c Sat Jul 9 09:34:24 2016 (r302482) @@ -1673,8 +1673,12 @@ xeon_set_sbar_base_and_limit(struct ntb_ uint32_t base_reg, lmt_reg; bar_get_xlat_params(ntb, idx, &base_reg, NULL, &lmt_reg); - if (idx == regbar) - bar_addr += ntb->b2b_off; + if (idx == regbar) { + if (ntb->b2b_off) + bar_addr += ntb->b2b_off; + else + bar_addr = 0; + } /* * Set limit registers first to avoid an errata where setting the base