Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 9 Jan 2009 12:38:41 +0000 (UTC)
From:      Rafal Jaworowski <raj@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r186947 - head/sys/arm/mv
Message-ID:  <200901091238.n09CcfVZ057002@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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;
 	}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200901091238.n09CcfVZ057002>