Date: Mon, 19 Nov 2018 02:43:34 +0000 (UTC) From: "Jayachandran C." <jchandra@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r340596 - head/sys/dev/pci Message-ID: <201811190243.wAJ2hYio007230@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jchandra Date: Mon Nov 19 02:43:34 2018 New Revision: 340596 URL: https://svnweb.freebsd.org/changeset/base/340596 Log: pci_host_generic: allocate resources against devices Fix up pci_host_generic.c and pci_host_generic_fdt.c to allocate resources against devices that requested them. Currently the allocation happens against the pcib, which is incorrect. This is needed for the upcoming changes for fixing up pci_host_generic_acpi.c Reviewed by: andrew Differential Revision: https://reviews.freebsd.org/D17656 Modified: head/sys/dev/pci/pci_host_generic.c head/sys/dev/pci/pci_host_generic_fdt.c Modified: head/sys/dev/pci/pci_host_generic.c ============================================================================== --- head/sys/dev/pci/pci_host_generic.c Mon Nov 19 02:38:02 2018 (r340595) +++ head/sys/dev/pci/pci_host_generic.c Mon Nov 19 02:43:34 2018 (r340596) @@ -310,7 +310,7 @@ pci_host_generic_core_alloc_resource(device_t dev, dev rm = generic_pcie_rman(sc, type); if (rm == NULL) - return (BUS_ALLOC_RESOURCE(device_get_parent(dev), dev, + return (BUS_ALLOC_RESOURCE(device_get_parent(dev), child, type, rid, start, end, count, flags)); if (bootverbose) { Modified: head/sys/dev/pci/pci_host_generic_fdt.c ============================================================================== --- head/sys/dev/pci/pci_host_generic_fdt.c Mon Nov 19 02:38:02 2018 (r340595) +++ head/sys/dev/pci/pci_host_generic_fdt.c Mon Nov 19 02:43:34 2018 (r340596) @@ -423,6 +423,7 @@ generic_pcie_fdt_activate_resource(device_t dev, devic } break; case SYS_RES_MEMORY: + case SYS_RES_IRQ: res = BUS_ACTIVATE_RESOURCE(device_get_parent(dev), child, type, rid, r); break; @@ -445,6 +446,7 @@ generic_pcie_fdt_deactivate_resource(device_t dev, dev switch(type) { case SYS_RES_IOPORT: case SYS_RES_MEMORY: + case SYS_RES_IRQ: res = BUS_DEACTIVATE_RESOURCE(device_get_parent(dev), child, type, rid, r); break;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201811190243.wAJ2hYio007230>