bus_.*_resource() and rid
John Baldwin
jhb at freebsd.org
Tue Sep 29 20:42:26 UTC 2015
On Monday, September 28, 2015 07:04:27 PM Pokala, Ravi wrote:
> -----Original Message-----
> From: Ravi Pokala <rpokala at panasas.com>
> Date: 2015-09-28, Monday at 11:52
> To: John Baldwin <jhb at freebsd.org>
> Cc: "freebsd-hackers at freebsd.org" <freebsd-hackers at freebsd.org>
> Subject: Re: bus_.*_resource() and rid
>
> >Hmm... perhaps:
> >
> > struct resource_list *rl =
> >bus_get_resource_list(device_get_parent(dev), dev);
> > rid = resource_list_add_next(rl, SYS_RES_IOPORT, start, end, count);
> >
> >I'll try that.
>
> Err, never mind, resource_list_add_next() doesn't do what I was thinking
> it did. So, forget I said that. :-)
Yeah, it's only really for bus drivers to use internally when enumerating
resources (e.g. ACPI uses it when walking _CRS so that if there are multiple
memory resources they use rids 0 .. N).
--
John Baldwin
More information about the freebsd-hackers
mailing list