From owner-freebsd-hackers Thu May 18 18: 4:55 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from smtp02.teb1.iconnet.net (smtp02.teb1.iconnet.net [209.3.218.43]) by hub.freebsd.org (Postfix) with ESMTP id 1626337BDC5; Thu, 18 May 2000 18:04:44 -0700 (PDT) (envelope-from babkin@bellatlantic.net) Received: from bellatlantic.net (client-151-198-135-33.bellatlantic.net [151.198.135.33]) by smtp02.teb1.iconnet.net (8.9.1/8.9.1) with ESMTP id VAA05738; Thu, 18 May 2000 21:04:22 -0400 (EDT) Message-ID: <3924931E.A8471B0@bellatlantic.net> Date: Thu, 18 May 2000 21:04:30 -0400 From: Sergey Babkin X-Mailer: Mozilla 4.7 [en] (X11; U; FreeBSD 4.0-19990626-CURRENT i386) X-Accept-Language: ru, en MIME-Version: 1.0 To: Warner Losh Cc: Alexander Langer , doc@FreeBSD.ORG, hackers@FreeBSD.ORG Subject: Re: request for review: bus_alloc_resource(9) References: <20000518223846.A16098@cichlids.cichlids.com> <200005182332.RAA97696@harmony.village.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Warner Losh wrote: > > One should generally only call these functions in attach. If you must > call them in probe, one must release the resource before returning > from the probe. However, since they can affect bridge settings, it > may be unavoidable to call them from the probe routine. The code seems to guarantee that if the probe routine returns 0 then the attach routine will be called right away. So if the probe routine returns 0 they don't have to be freed. Actually, the comments seem to say explicitly that the resources should be freed only if the probe routine returns a negative value but not 0. Or am I missing something ? -SB To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message