From owner-svn-src-head@FreeBSD.ORG Fri Jan 9 12:38:41 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A0640106566C; Fri, 9 Jan 2009 12:38:41 +0000 (UTC) (envelope-from raj@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8EFC98FC16; Fri, 9 Jan 2009 12:38:41 +0000 (UTC) (envelope-from raj@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n09CcfKC057003; Fri, 9 Jan 2009 12:38:41 GMT (envelope-from raj@svn.freebsd.org) Received: (from raj@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n09CcfVZ057002; Fri, 9 Jan 2009 12:38:41 GMT (envelope-from raj@svn.freebsd.org) Message-Id: <200901091238.n09CcfVZ057002@svn.freebsd.org> From: Rafal Jaworowski Date: Fri, 9 Jan 2009 12:38:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186947 - head/sys/arm/mv X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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: Fri, 09 Jan 2009 12:38:42 -0000 Author: raj Date: Fri Jan 9 12:38:41 2009 New Revision: 186947 URL: http://svn.freebsd.org/changeset/base/186947 Log: Check PCIE link status before accessing the bus. Some 88F5182-based systems (Linkstation) have problems when PCIE is accessed without any peripherals present. Modified: head/sys/arm/mv/mv_pci.c Modified: head/sys/arm/mv/mv_pci.c ============================================================================== --- head/sys/arm/mv/mv_pci.c Fri Jan 9 12:17:37 2009 (r186946) +++ head/sys/arm/mv/mv_pci.c Fri Jan 9 12:38:41 2009 (r186947) @@ -80,6 +80,7 @@ __FBSDID("$FreeBSD$"); #define PCIE_REG_STATUS 0x1A04 #define PCIE_REG_IRQ_MASK 0x1910 +#define STATUS_LINK_DOWN 1 #define STATUS_BUS_OFFS 8 #define STATUS_BUS_MASK (0xFF << STATUS_BUS_OFFS) #define STATUS_DEV_OFFS 16 @@ -436,6 +437,8 @@ pcib_mbus_probe(device_t self) P2P_CONF_DEV_OFFS; } else { val = bus_space_read_4(sc->sc_bst, sc->sc_bsh, PCIE_REG_STATUS); + if (val & STATUS_LINK_DOWN) + goto out; bus = sc->sc_busnr = (val & STATUS_BUS_MASK) >> STATUS_BUS_OFFS; dev = sc->sc_devnr = (val & STATUS_DEV_MASK) >> STATUS_DEV_OFFS; }