mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-16 10:20:30 +00:00
MFp4: Set the bus handle to the bus handle of the resource, not the
starting value. This is more pedantically correct (since the handle isn't always identical to the start of the resource) and also doesn't access the innards of struct resource direct (which I forbid in my tree). We need to do this for all resource types, not just ioport. Reviewed by: njl
This commit is contained in:
parent
55336b83e0
commit
a323657048
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=131189
@ -891,10 +891,9 @@ acpi_alloc_resource(device_t bus, device_t child, int type, int *rid,
|
||||
if (res == NULL)
|
||||
return (NULL);
|
||||
|
||||
/* Copy the bus tag from the pre-allocated resource. */
|
||||
/* Copy the bus tag and handle from the pre-allocated resource. */
|
||||
rman_set_bustag(res, rman_get_bustag(rle->res));
|
||||
if (type == SYS_RES_IOPORT)
|
||||
rman_set_bushandle(res, res->r_start);
|
||||
rman_set_bushandle(res, rman_get_bushandle(res));
|
||||
|
||||
/* If requested, activate the resource using the parent's method. */
|
||||
if (flags & RF_ACTIVE)
|
||||
|
Loading…
Reference in New Issue
Block a user