Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 27 Jun 2012 22:17:53 +0000 (UTC)
From:      Marius Strobl <marius@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r237673 - head/sys/dev/pci
Message-ID:  <201206272217.q5RMHrHT036181@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: marius
Date: Wed Jun 27 22:17:52 2012
New Revision: 237673
URL: http://svn.freebsd.org/changeset/base/237673

Log:
  For subtractively decoding bridges, don't try to grow windows but pass
  the request up the tree in order to be on the safe side. Growing windows
  in this case would mean to switch resources to positive decoding and
  it's unclear how to correctly handle this. At least with ALi/ULi M5249
  PCI-PCI bridges, this also just doesn't work out of the box.
  
  Reviewed by:	jhb
  MFC after:	3 days

Modified:
  head/sys/dev/pci/pci_pci.c

Modified: head/sys/dev/pci/pci_pci.c
==============================================================================
--- head/sys/dev/pci/pci_pci.c	Wed Jun 27 22:13:40 2012	(r237672)
+++ head/sys/dev/pci/pci_pci.c	Wed Jun 27 22:17:52 2012	(r237673)
@@ -1038,7 +1038,7 @@ pcib_alloc_resource(device_t dev, device
 	case SYS_RES_IOPORT:
 		r = pcib_suballoc_resource(sc, &sc->io, child, type, rid, start,
 		    end, count, flags);
-		if (r != NULL)
+		if (r != NULL || (sc->flags & PCIB_SUBTRACTIVE) != 0)
 			break;
 		if (pcib_grow_window(sc, &sc->io, type, start, end, count,
 		    flags) == 0)
@@ -1062,7 +1062,7 @@ pcib_alloc_resource(device_t dev, device
 		}
 		r = pcib_suballoc_resource(sc, &sc->mem, child, type, rid,
 		    start, end, count, flags);
-		if (r != NULL)
+		if (r != NULL || (sc->flags & PCIB_SUBTRACTIVE) != 0)
 			break;
 		if (flags & RF_PREFETCHABLE) {
 			if (pcib_grow_window(sc, &sc->pmem, type, start, end,



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