From owner-freebsd-hackers Wed Jun 6 9:50:32 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from rover.village.org (rover.bsdimp.com [204.144.255.66]) by hub.freebsd.org (Postfix) with ESMTP id D2AC937B417 for ; Wed, 6 Jun 2001 09:50:19 -0700 (PDT) (envelope-from imp@billy-club.village.org) Received: from billy-club.village.org (billy-club.village.org [10.0.0.3]) by rover.village.org (8.11.3/8.11.3) with ESMTP id f56GoI628852; Wed, 6 Jun 2001 10:50:18 -0600 (MDT) (envelope-from imp@billy-club.village.org) Received: from billy-club.village.org (localhost [127.0.0.1]) by billy-club.village.org (8.11.2/8.8.3) with ESMTP id f56Gqll00452; Wed, 6 Jun 2001 10:52:47 -0600 (MDT) Message-Id: <200106061652.f56Gqll00452@billy-club.village.org> To: j mckitrick Subject: Re: newbussifying drivers Cc: freebsd-hackers@FreeBSD.ORG In-reply-to: Your message of "Tue, 05 Jun 2001 18:21:51 BST." <20010605182151.A90883@dogma.freebsd-uk.eu.org> References: <20010605182151.A90883@dogma.freebsd-uk.eu.org> Date: Wed, 06 Jun 2001 10:52:47 -0600 From: Warner Losh Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In message <20010605182151.A90883@dogma.freebsd-uk.eu.org> j mckitrick writes: : The newbus routines use a certain amount of overhead, but once done, you : forget about it. In some device drivers, the probe methods often need to : try a variety of hardware ports. In the past, inb/outb was used, along with : an often hardcoded port address. : : Does it make sense to call bus_allocate_resource for every hardware port we : probe? What is the best way to handle this so NO inb/out is used, even for : probing? Most of the drivers in the past that have done the soul searching for hardware have been convereted to not do the soul searching but instead rely strictly on the hints. I think that's what we need to do for the parallel drivers as well. If it must do the soul searching, and I see no reason why it should be special as it causes other problems for wiring when you have multiple parallel ports, then you should likely bus_alloc_resource for every hardware address. This gives you a modest probability that those addresses are not used by another device and you won't hork hardware that otherwise resides there. Warenr To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message