Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F102747885
D44126.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
D44126.diff
View Options
diff --git a/sys/dev/bhnd/bhndb/bhndb.c b/sys/dev/bhnd/bhndb/bhndb.c
--- a/sys/dev/bhnd/bhndb/bhndb.c
+++ b/sys/dev/bhnd/bhndb/bhndb.c
@@ -1113,7 +1113,7 @@
goto done;
/* Otherwise, the range is limited by the bridged resource mapping */
- error = bhndb_find_resource_limits(sc->bus_res, type, r, &mstart,
+ error = bhndb_find_resource_limits(sc->bus_res, r, &mstart,
&mend);
if (error)
goto done;
diff --git a/sys/dev/bhnd/bhndb/bhndb_private.h b/sys/dev/bhnd/bhndb/bhndb_private.h
--- a/sys/dev/bhnd/bhndb/bhndb_private.h
+++ b/sys/dev/bhnd/bhndb/bhndb_private.h
@@ -73,7 +73,7 @@
const struct bhndb_regwin *static_regwin);
int bhndb_find_resource_limits(
- struct bhndb_resources *br, int type,
+ struct bhndb_resources *br,
struct resource *r, rman_res_t *start,
rman_res_t *end);
diff --git a/sys/dev/bhnd/bhndb/bhndb_subr.c b/sys/dev/bhnd/bhndb/bhndb_subr.c
--- a/sys/dev/bhnd/bhndb/bhndb_subr.c
+++ b/sys/dev/bhnd/bhndb/bhndb_subr.c
@@ -987,7 +987,6 @@
* returned.
*
* @param br The resource state to search.
- * @param type The resource type (see SYS_RES_*).
* @param r The resource to search for in @p br.
* @param[out] start On success, the minimum supported start address.
* @param[out] end On success, the maximum supported end address.
@@ -996,14 +995,14 @@
* @retval ENOENT no active mapping found for @p r of @p type
*/
int
-bhndb_find_resource_limits(struct bhndb_resources *br, int type,
+bhndb_find_resource_limits(struct bhndb_resources *br,
struct resource *r, rman_res_t *start, rman_res_t *end)
{
struct bhndb_dw_alloc *dynamic;
struct bhndb_region *sregion;
struct bhndb_intr_handler *ih;
- switch (type) {
+ switch (rman_get_type(r)) {
case SYS_RES_IRQ:
/* Is this one of ours? */
STAILQ_FOREACH(ih, &br->bus_intrs, ih_link) {
@@ -1042,7 +1041,8 @@
}
default:
- device_printf(br->dev, "unknown resource type: %d\n", type);
+ device_printf(br->dev, "unknown resource type: %d\n",
+ rman_get_type(r));
return (ENOENT);
}
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Nov 17, 4:17 PM (21 h, 6 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14682001
Default Alt Text
D44126.diff (2 KB)
Attached To
Mode
D44126: bhnd: Use rman_get_type in bhndb_find_resource_limits
Attached
Detach File
Event Timeline
Log In to Comment