PERFORCE change 230994 for review

John Baldwin jhb at FreeBSD.org
Thu Jul 11 03:05:33 UTC 2013


http://p4web.freebsd.org/@@230994?ac=10

Change 230994 by jhb at jhb_pippin on 2013/07/11 03:04:55

	Fix the PCI bus driver to permit immediate child bridges to
	allocate a single bus number resource.

Affected files ...

.. //depot/projects/pci/sys/dev/pci/pci.c#42 edit

Differences ...

==== //depot/projects/pci/sys/dev/pci/pci.c#42 (text+ko) ====

@@ -4292,6 +4292,20 @@
 	rl = &dinfo->resources;
 	cfg = &dinfo->cfg;
 	switch (type) {
+#if defined(NEW_PCIB) && defined(PCI_RES_BUS)
+	case PCI_RES_BUS:
+		/*
+		 * If rid 0 is not already allocated, create a new
+		 * resource list entry.
+		 */
+		if (*rid != 0)
+			return (NULL);
+		rle = resource_list_find(rl, type, *rid);
+		if (rle != NULL && rle->res != NULL)
+			return (NULL);
+		resource_list_add(rl, type, *rid, start, end, count);
+		break;
+#endif
 	case SYS_RES_IRQ:
 		/*
 		 * Can't alloc legacy interrupt once MSI messages have


More information about the p4-projects mailing list