Subject: Re: devd-alike for NetBSD
To: Jason Thorpe <thorpej@shagadelic.org>
From: Matt Thomas <matt@3am-software.com>
List: tech-kern
Date: 02/09/2005 14:06:45
At 01:37 PM 2/9/2005, Jason Thorpe wrote:

>On Feb 9, 2005, at 1:30 PM, Pavel Cahyna wrote:
>
>>I see. Is there any place where the actually discovered locators can be
>>found?
>
>No, as far as I know, the kernel maintains no record of this.  It is 
>temporary-only information in the attach_args.

struct device has a member, dv_locators, with a comment of "our actual 
locators (optional)".
config_attach_loc will copy the locators passed in "ldesc" to that 
field.  However, most every use of that routine passes a NULL for 
"ldesc".  (only ISA and SCSIBUS pass a non-null "ldesc").

locdesc_t is disgusting and the hack in isa.c to use it is horrid.  I think 
I'd rather see locdesc_t be a struct { int len; int *locs}; and then change 
dv_locators to a locdesc_t.

Then start changing the callers of config_attach to use config_attach_loc 
with a valid ldesc.

-- 
Matt Thomas                     email: matt@3am-software.com
3am Software Foundry              www: http://3am-software.com/bio/matt/
Cupertino, CA              disclaimer: I avow all knowledge of this message.