From owner-freebsd-hackers Wed Mar 21 1:26:34 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from linux.ssc.nsu.ru (linux.ssc.nsu.ru [193.124.219.91]) by hub.freebsd.org (Postfix) with SMTP id E9D7A37B723 for ; Wed, 21 Mar 2001 01:26:04 -0800 (PST) (envelope-from danfe@inet.ssc.nsu.ru) Received: (qmail 22599 invoked from network); 21 Mar 2001 09:25:54 -0000 Received: from inet.ssc.nsu.ru (62.76.110.12) by hub.freebsd.org with SMTP; 21 Mar 2001 09:25:54 -0000 Received: from localhost (danfe@localhost) by inet.ssc.nsu.ru (8.9.3/8.9.3) with ESMTP id PAA16266; Wed, 21 Mar 2001 15:25:35 +0600 Date: Wed, 21 Mar 2001 15:25:34 +0600 (NOVT) From: Alexey Dokuchaev To: Mike Smith Cc: freebsd-hackers@freebsd.org Subject: Re: Some PCI-related programming things In-Reply-To: <200103210915.f2L9FG502274@mass.dis.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Wed, 21 Mar 2001, Mike Smith wrote: > > > > Hey, that's not fair :-) I'd like to know how to do things the rigth way. > > > > > > You'll need to tell us what it is that you're actually doing, then, since > > > it's hard to guess from a tiny snippet like that. 8) > > > > Well, but if you didn't know, how could you tell that I'm doing something > > very wrong then? :-) > > Because dinking with PCI configuration space is usually the wrong thing > to do from userland. So what about pciconf(8)? > > > I was porting (that is, it's not mine) some linux code that walks thru PCI > > bus, searches for a particular device, and when it finds any, figures out > > their parameters and fills some structures. > > > > This code is used, actually, in char device driver. > > Mm, so what's it doing in userspace? 8) Did I say I'm doing it from userspace?! If I did (too lazy to dig into sent-mail), I beg your pardon :) -- Rgs, Alexey To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message