From owner-svn-src-all@FreeBSD.ORG Thu Nov 1 20:39:40 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6F59753A; Thu, 1 Nov 2012 20:39:40 +0000 (UTC) (envelope-from jmallett@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5706C8FC14; Thu, 1 Nov 2012 20:39:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id qA1KdeSd072055; Thu, 1 Nov 2012 20:39:40 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id qA1KdeLH072053; Thu, 1 Nov 2012 20:39:40 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201211012039.qA1KdeLH072053@svn.freebsd.org> From: Juli Mallett Date: Thu, 1 Nov 2012 20:39:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242454 - head/sys/mips/cavium 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.14 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: Thu, 01 Nov 2012 20:39:40 -0000 Author: jmallett Date: Thu Nov 1 20:39:39 2012 New Revision: 242454 URL: http://svn.freebsd.org/changeset/base/242454 Log: Don't disable PCIe just because the host is not a PCI host; the latter flag only applies to non-PCIe systems. If PCIe is in target mode, it will simply and gracefully fail to attach of its own accord. Modified: head/sys/mips/cavium/octopci.c Modified: head/sys/mips/cavium/octopci.c ============================================================================== --- head/sys/mips/cavium/octopci.c Thu Nov 1 20:09:48 2012 (r242453) +++ head/sys/mips/cavium/octopci.c Thu Nov 1 20:39:39 2012 (r242454) @@ -104,10 +104,6 @@ static uint64_t octopci_cs_addr(unsigned static void octopci_identify(driver_t *drv, device_t parent) { - /* Check whether we are a PCI host. */ - if ((cvmx_sysinfo_get()->bootloader_config_flags & CVMX_BOOTINFO_CFG_FLAG_PCI_HOST) == 0) - return; - BUS_ADD_CHILD(parent, 0, "pcib", 0); if (octeon_has_feature(OCTEON_FEATURE_PCIE)) BUS_ADD_CHILD(parent, 0, "pcib", 1); @@ -121,6 +117,10 @@ octopci_probe(device_t dev) return (0); } + /* Check whether we are a PCI host. */ + if ((cvmx_sysinfo_get()->bootloader_config_flags & CVMX_BOOTINFO_CFG_FLAG_PCI_HOST) == 0) + return (ENXIO); + if (device_get_unit(dev) != 0) return (ENXIO);