Details
Details
Diff Detail
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
Comment Actions
If a driver calls bus_alloc_resource() with SYS_RES_IOPORT, it will also call bus_release_resource with SYS_RES_IOPORT during detach, so if a resource type is remapped it needs to be done so consistently.
It would be more ideal IMO if we only passed the 'type' to bus_alloc_resource and then saved the type in the returned struct resource (just as we save the rid today) so that other routines that acted on allocated resources like bus_activate_resource and bus_release_resource only passed in struct resource *r and the rid and type were obtained from r. However, that is a larger API change. We could play some games with macros to change these APIs in 15 perhaps similar to how I removed the devclass argument from DRIVER_MODULE in 14.