Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F106210003
D30986.id91718.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
D30986.id91718.diff
View Options
Index: sys/dev/pci/pci_host_generic.c
===================================================================
--- sys/dev/pci/pci_host_generic.c
+++ sys/dev/pci/pci_host_generic.c
@@ -324,7 +324,7 @@
}
static bool
-generic_pcie_translate_resource(device_t dev, int type, rman_res_t start,
+generic_pcie_translate_resource_common(device_t dev, int type, rman_res_t start,
rman_res_t end, rman_res_t *new_start, rman_res_t *new_end)
{
struct generic_pcie_core_softc *sc;
@@ -380,6 +380,16 @@
return (found);
}
+static int
+generic_pcie_translate_resource(device_t bus, int type,
+ rman_res_t start, rman_res_t *newstart)
+{
+ rman_res_t newend; /* unused */
+
+ return (!generic_pcie_translate_resource_common(
+ bus, type, start, 0, newstart, &newend));
+}
+
struct resource *
pci_host_generic_core_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)
@@ -404,7 +414,7 @@
type, rid, start, end, count, flags));
/* Translate the address from a PCI address to a physical address */
- if (!generic_pcie_translate_resource(dev, type, start, end, &phys_start,
+ if (!generic_pcie_translate_resource_common(dev, type, start, end, &phys_start,
&phys_end)) {
device_printf(dev,
"Failed to translate resource %jx-%jx type %x for %s\n",
@@ -456,7 +466,7 @@
start = rman_get_start(r);
end = rman_get_end(r);
- if (!generic_pcie_translate_resource(dev, type, start, end, &start,
+ if (!generic_pcie_translate_resource_common(dev, type, start, end, &start,
&end))
return (EINVAL);
rman_set_start(r, start);
@@ -527,6 +537,7 @@
DEVMETHOD(bus_activate_resource, generic_pcie_activate_resource),
DEVMETHOD(bus_deactivate_resource, generic_pcie_deactivate_resource),
DEVMETHOD(bus_release_resource, pci_host_generic_core_release_resource),
+ DEVMETHOD(bus_translate_resource, generic_pcie_translate_resource),
DEVMETHOD(bus_setup_intr, bus_generic_setup_intr),
DEVMETHOD(bus_teardown_intr, bus_generic_teardown_intr),
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Dec 28, 5:42 AM (3 h, 15 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15620554
Default Alt Text
D30986.id91718.diff (2 KB)
Attached To
Mode
D30986: pci_host_generic: implement bus_translate_resource (for LinuxKPI)
Attached
Detach File
Event Timeline
Log In to Comment