Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F107062007
D44206.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D44206.diff
View Options
diff --git a/sys/dev/pci/pci_host_generic.c b/sys/dev/pci/pci_host_generic.c
--- a/sys/dev/pci/pci_host_generic.c
+++ b/sys/dev/pci/pci_host_generic.c
@@ -504,8 +504,8 @@
}
static int
-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)
+generic_pcie_translate_resource(device_t dev, int type, rman_res_t start,
+ rman_res_t *new_start)
{
struct pcie_range *range;
@@ -513,34 +513,20 @@
switch (type) {
case SYS_RES_IOPORT:
case SYS_RES_MEMORY:
- range = generic_pcie_containing_range(dev, type, start, end);
+ range = generic_pcie_containing_range(dev, type, start, start);
if (range == NULL)
return (ENOENT);
- if (range != NULL) {
- *new_start = start - range->pci_base + range->phys_base;
- *new_end = end - range->pci_base + range->phys_base;
- }
+ *new_start = start - range->pci_base + range->phys_base;
break;
default:
/* No translation for non-memory types */
*new_start = start;
- *new_end = end;
break;
}
return (0);
}
-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, start, 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)
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Jan 10, 12:28 PM (14 h, 48 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15742648
Default Alt Text
D44206.diff (1 KB)
Attached To
Mode
D44206: pci_host_generic: Simplify generic_pcie_translate_resource
Attached
Detach File
Event Timeline
Log In to Comment