From owner-cvs-all@FreeBSD.ORG Thu Jun 26 13:35:19 2003 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D1A8237B401; Thu, 26 Jun 2003 13:35:19 -0700 (PDT) Received: from magic.adaptec.com (magic-mail.adaptec.com [208.236.45.100]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2CEC143FBD; Thu, 26 Jun 2003 13:35:19 -0700 (PDT) (envelope-from scottl@freebsd.org) Received: from redfish.adaptec.com (redfish.adaptec.com [162.62.50.11]) by magic.adaptec.com (8.11.6/8.11.6) with ESMTP id h5QKYW801039; Thu, 26 Jun 2003 13:34:32 -0700 Received: from freebsd.org (hollin.btc.adaptec.com [10.100.253.56]) by redfish.adaptec.com (8.8.8p2+Sun/8.8.8) with ESMTP id NAA22422; Thu, 26 Jun 2003 13:35:18 -0700 (PDT) Message-ID: <3EFB5841.8000500@freebsd.org> Date: Thu, 26 Jun 2003 14:32:01 -0600 From: Scott Long User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.3) Gecko/20030414 X-Accept-Language: en-us, en MIME-Version: 1.0 To: John Baldwin References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: cvs-src@freebsd.org cc: src-committers@freebsd.org cc: cvs-all@freebsd.org Subject: Re: cvs commit: src/sys/dev/ips ips.c ips.h ips_commands.c ips_pci.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Jun 2003 20:35:20 -0000 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'. >