From owner-svn-src-all@freebsd.org Tue Oct 20 01:46:16 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 3EB97A1984D; Tue, 20 Oct 2015 01:46:16 +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 0B66C3A0; Tue, 20 Oct 2015 01:46:15 +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 t9K1kFsG027502; Tue, 20 Oct 2015 01:46:15 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9K1kF9O027501; Tue, 20 Oct 2015 01:46:15 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201510200146.t9K1kF9O027501@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:46:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289611 - 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: Tue, 20 Oct 2015 01:46:16 -0000 Author: cem Date: Tue Oct 20 01:46:14 2015 New Revision: 289611 URL: https://svnweb.freebsd.org/changeset/base/289611 Log: NTB: MFV 5ae0beb6: Enable link for Intel root port mode in probe We skip actually bringing up Rootport/Transparent configurations, so most of this doesn't apply. Original Linux commit log: Link training should be enabled in the driver probe for root port mode. We should not have to wait for transport to be loaded for this to happen. Otherwise the ntb device will not show up on the transparent bridge side of the link. Authored by: Dave Jiang 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 Tue Oct 20 01:46:05 2015 (r289610) +++ head/sys/dev/ntb/ntb_hw/ntb_hw.c Tue Oct 20 01:46:14 2015 (r289611) @@ -1481,8 +1481,11 @@ static inline bool link_is_up(struct ntb_softc *ntb) { - if (ntb->type == NTB_XEON) + if (ntb->type == NTB_XEON) { + if (ntb->conn_type == NTB_CONN_TRANSPARENT) + return (true); return ((ntb->lnk_sta & NTB_LINK_STATUS_ACTIVE) != 0); + } KASSERT(ntb->type == NTB_SOC, ("ntb type")); return ((ntb->ntb_ctl & SOC_CNTL_LINK_DOWN) == 0);