From owner-svn-src-head@freebsd.org Tue Oct 13 20:54:40 2015 Return-Path: Delivered-To: svn-src-head@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 4D1BAA12D21; Tue, 13 Oct 2015 20:54:40 +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 EEA819D8; Tue, 13 Oct 2015 20:54:39 +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 t9DKscII064618; Tue, 13 Oct 2015 20:54:38 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9DKsc3Z064616; Tue, 13 Oct 2015 20:54:38 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201510132054.t9DKsc3Z064616@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Tue, 13 Oct 2015 20:54:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289265 - 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Oct 2015 20:54:40 -0000 Author: cem Date: Tue Oct 13 20:54:38 2015 New Revision: 289265 URL: https://svnweb.freebsd.org/changeset/base/289265 Log: NTB: MFV b1ef0043: Remove References of non-B2B BWD HW NTB-RP is not a supported configuration on BWD hardware. Remove the code attempting to set it up. Authored by: Jon Mason Obtained from: Linux (dual BSD/GPL driver) Sponsored by: EMC / Isilon Storage Division Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.c head/sys/dev/ntb/ntb_hw/ntb_regs.h Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.c ============================================================================== --- head/sys/dev/ntb/ntb_hw/ntb_hw.c Tue Oct 13 20:45:29 2015 (r289264) +++ head/sys/dev/ntb/ntb_hw/ntb_hw.c Tue Oct 13 20:54:38 2015 (r289265) @@ -810,10 +810,9 @@ ntb_setup_soc(struct ntb_softc *ntb) case NTB_CONN_B2B: ntb->conn_type = NTB_CONN_B2B; break; - case NTB_CONN_RP: default: - device_printf(ntb->device, "Connection type %d not supported\n", - connection_type); + device_printf(ntb->device, + "Unsupported NTB configuration (%d)\n", connection_type); return (ENXIO); } @@ -828,23 +827,16 @@ ntb_setup_soc(struct ntb_softc *ntb) ntb->reg_ofs.ldb = SOC_PDOORBELL_OFFSET; ntb->reg_ofs.ldb_mask = SOC_PDBMSK_OFFSET; + ntb->reg_ofs.rdb = SOC_B2B_DOORBELL_OFFSET; ntb->reg_ofs.bar2_xlat = SOC_SBAR2XLAT_OFFSET; ntb->reg_ofs.bar4_xlat = SOC_SBAR4XLAT_OFFSET; ntb->reg_ofs.lnk_cntl = SOC_NTBCNTL_OFFSET; ntb->reg_ofs.lnk_stat = SOC_LINK_STATUS_OFFSET; ntb->reg_ofs.spad_local = SOC_SPAD_OFFSET; + ntb->reg_ofs.spad_remote = SOC_B2B_SPAD_OFFSET; ntb->reg_ofs.spci_cmd = SOC_PCICMD_OFFSET; - if (ntb->conn_type == NTB_CONN_B2B) { - ntb->reg_ofs.rdb = SOC_B2B_DOORBELL_OFFSET; - ntb->reg_ofs.spad_remote = SOC_B2B_SPAD_OFFSET; - ntb->limits.max_spads = SOC_MAX_SPADS; - } else { - ntb->reg_ofs.rdb = SOC_PDOORBELL_OFFSET; - ntb->reg_ofs.spad_remote = SOC_SPAD_OFFSET; - ntb->limits.max_spads = SOC_MAX_COMPAT_SPADS; - } - + ntb->limits.max_spads = SOC_MAX_SPADS; ntb->limits.max_db_bits = SOC_MAX_DB_BITS; ntb->limits.msix_cnt = SOC_MSIX_CNT; ntb->bits_per_vector = SOC_DB_BITS_PER_VEC; Modified: head/sys/dev/ntb/ntb_hw/ntb_regs.h ============================================================================== --- head/sys/dev/ntb/ntb_hw/ntb_regs.h Tue Oct 13 20:45:29 2015 (r289264) +++ head/sys/dev/ntb/ntb_hw/ntb_regs.h Tue Oct 13 20:54:38 2015 (r289265) @@ -75,7 +75,6 @@ #define SOC_MSIX_CNT 34 #define SOC_MAX_SPADS 16 -#define SOC_MAX_COMPAT_SPADS 16 #define SOC_MAX_DB_BITS 34 #define SOC_DB_BITS_PER_VEC 1