cvs commit: src/sys/dev/ips ips.c ips.h ips_commands.c ips_pci.c
Scott Long
scottl at freebsd.org
Thu Jun 26 13:35:20 PDT 2003
John Baldwin wrote:
> On 26-Jun-2003 Scott Long wrote:
>
>>scottl 2003/06/25 17:03:59 PDT
>>
>> FreeBSD src repository
>>
>> Modified files:
>> sys/dev/ips ips.c ips.h ips_commands.c ips_pci.c
>> Log:
>> - Zero the buffers used to hold configuration data from the card. Not doing
>> so can leave stale data in the buffer and confuse the driver.
>> - enable the ability to set the 'disable' hint for the driver to keep it
>> from attaching. i.e. 'hw.ips.0.disable=1' will prevent the driver from
>> attaching.
>
>
> Should be "hint.ips.0.disabled".
Mea Culpa
> Perhaps we need to add a resource_disabled()
> function to abstract this so people stop getting it wrong. Something like:
>
This sounds like an excellent idea. Should it be part of newbus? I'm
pretty ambivolent about the syntax that is used; doing it in one common
place ensures that all the drivers will have in the same way, which is
the most important attribute.
Scott
> int
> resource_disabled(const char *name, int unit)
> {
> int error, value;
>
> value = resource_int_value(name, unit, "disabled", &error);
> if (error == 0)
> return (value);
> return (0);
> }
>
> You could then expand this function to check 'disable' as well if
> desired and allow for 'true' and 'false', 'on' and 'off' in addition
> to '0' and '1'.
>
More information about the cvs-src
mailing list