Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F163442826
D6453.id16610.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D6453.id16610.diff
View Options
Index: head/sys/arm64/cavium/thunder_pcie_pem.c
===================================================================
--- head/sys/arm64/cavium/thunder_pcie_pem.c
+++ head/sys/arm64/cavium/thunder_pcie_pem.c
@@ -313,6 +313,10 @@
struct rman *rm;
sc = device_get_softc(dev);
+#if defined(NEW_PCIB) && defined(PCI_RES_BUS)
+ if (type == PCI_RES_BUS)
+ return (pci_domain_adjust_bus(sc->id, child, res, start, end));
+#endif
rm = thunder_pem_rman(sc, type);
if (rm == NULL)
@@ -619,6 +623,11 @@
struct resource *res;
device_t parent_dev;
+#if defined(NEW_PCIB) && defined(PCI_RES_BUS)
+ if (type == PCI_RES_BUS)
+ return (pci_domain_alloc_bus(sc->id, child, rid, start, end,
+ count, flags));
+#endif
rm = thunder_pem_rman(sc, type);
if (rm == NULL) {
/* Find parent device. On ThunderX we know an exact path. */
@@ -675,7 +684,12 @@
struct resource *res)
{
device_t parent_dev;
+#if defined(NEW_PCIB) && defined(PCI_RES_BUS)
+ struct thunder_pem_softc *sc = device_get_softc(dev);
+ if (type == PCI_RES_BUS)
+ return (pci_domain_release_bus(sc->id, child, rid, res));
+#endif
/* Find parent device. On ThunderX we know an exact path. */
parent_dev = device_get_parent(device_get_parent(dev));
Index: head/sys/dev/pci/pci_host_generic.c
===================================================================
--- head/sys/dev/pci/pci_host_generic.c
+++ head/sys/dev/pci/pci_host_generic.c
@@ -501,7 +501,14 @@
generic_pcie_release_resource(device_t dev, device_t child, int type,
int rid, struct resource *res)
{
+#if defined(NEW_PCIB) && defined(PCI_RES_BUS)
+ struct generic_pcie_softc *sc;
+ if (type == PCI_RES_BUS) {
+ sc = device_get_softc(dev);
+ return (pci_domain_release_bus(sc->ecam, child, rid, res));
+ }
+#endif
/* For PCIe devices that do not have FDT nodes, use PCIB method */
if ((int)ofw_bus_get_node(child) <= 0) {
return (generic_pcie_release_resource_pcie(dev,
@@ -517,7 +524,15 @@
pci_host_generic_alloc_resource(device_t dev, device_t child, int type, int *rid,
rman_res_t start, rman_res_t end, rman_res_t count, u_int flags)
{
+#if defined(NEW_PCIB) && defined(PCI_RES_BUS)
+ struct generic_pcie_softc *sc;
+ if (type == PCI_RES_BUS) {
+ sc = device_get_softc(dev);
+ return (pci_domain_alloc_bus(sc->ecam, child, rid, start, end,
+ count, flags));
+ }
+#endif
/* For PCIe devices that do not have FDT nodes, use PCIB method */
if ((int)ofw_bus_get_node(child) <= 0)
return (generic_pcie_alloc_resource_pcie(dev, child, type, rid,
@@ -579,6 +594,11 @@
struct rman *rm;
sc = device_get_softc(dev);
+#if defined(NEW_PCIB) && defined(PCI_RES_BUS)
+ if (type == PCI_RES_BUS)
+ return (pci_domain_adjust_bus(sc->ecam, child, res, start,
+ end));
+#endif
rm = generic_pcie_rman(sc, type);
if (rm != NULL)
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Jul 24, 6:13 AM (6 h, 28 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
35433386
Default Alt Text
D6453.id16610.diff (2 KB)
Attached To
Mode
D6453: Add support for NEW_PCIB to the arm64 picb drivers
Attached
Detach File
Event Timeline
Log In to Comment