From owner-freebsd-hackers@FreeBSD.ORG Wed Mar 17 15:58:17 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 07C0516A4CE for ; Wed, 17 Mar 2004 15:58:17 -0800 (PST) Received: from cain.gsoft.com.au (cain.gsoft.com.au [203.31.81.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0820243D2F for ; Wed, 17 Mar 2004 15:58:16 -0800 (PST) (envelope-from doconnor@gsoft.com.au) Received: from inchoate.gsoft.com.au (localhost [127.0.0.1]) (authenticated bits=0) by cain.gsoft.com.au (8.12.9/8.12.8) with ESMTP id i2HNw4Q9098740; Thu, 18 Mar 2004 10:28:06 +1030 (CST) (envelope-from doconnor@gsoft.com.au) From: "Daniel O'Connor" To: freebsd-hackers@freebsd.org Date: Thu, 18 Mar 2004 10:28:03 +1030 User-Agent: KMail/1.6 References: <20040316150321.GA4900@tyler> In-Reply-To: <20040316150321.GA4900@tyler> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200403181028.03543.doconnor@gsoft.com.au> X-Spam-Score: -1.5 () CARRIAGE_RETURNS,IN_REP_TO,QUOTED_EMAIL_TEXT,REFERENCES,SPAM_PHRASE_00_01,USER_AGENT X-Scanned-By: MIMEDefang 2.16 (www . roaringpenguin . com / mimedefang) cc: thefly Subject: Re: bus_alloc_resource() returns NULL, but why? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Mar 2004 23:58:17 -0000 On Wed, 17 Mar 2004 01:33, thefly wrote: > Hi, i'm currently porting QuanCom PWDOG1 Watchdog card to FreeBSD, (you > can find the current code at http://chiakotay.nexlab.it/acaro/pwdog.c). > ... > but the problem is that bus_alloc_resource() returns NULL. I don't have > a clue about WHY it should. It's running on: FreeBSD 5.2.1-RELEASE with > GENERIC kernel in a dual pentium 200MMX. It will return NULL if the resource allocation failed. I think rid == 0 is what is incorrect here, either that or the card doesn't do IO (might be SYS_RES_MEMORY instead), try rid = 0x10. -- Daniel O'Connor software and network engineer for Genesis Software - http://www.gsoft.com.au "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum GPG Fingerprint - 9A8C 569F 685A D928 5140 AE4B 319B 41F4 5D17 FDD5