From owner-freebsd-hackers Wed Mar 21 0:52:18 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 E15D237B719 for ; Wed, 21 Mar 2001 00:52:12 -0800 (PST) (envelope-from danfe@inet.ssc.nsu.ru) Received: (qmail 22357 invoked from network); 21 Mar 2001 08:52:07 -0000 Received: from inet.ssc.nsu.ru (62.76.110.12) by hub.freebsd.org with SMTP; 21 Mar 2001 08:52:07 -0000 Received: from localhost (danfe@localhost) by inet.ssc.nsu.ru (8.9.3/8.9.3) with ESMTP id OAA14064; Wed, 21 Mar 2001 14:51:36 +0600 Date: Wed, 21 Mar 2001 14:51:34 +0600 (NOVT) From: Alexey Dokuchaev To: Mike Smith Cc: freebsd-hackers@freebsd.org Subject: Re: Some PCI-related programming things In-Reply-To: <200103210300.f2L30rO00891@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 Tue, 20 Mar 2001, Mike Smith wrote: > > > > Under linux, PCI stuff is generally done thru set of pci* functions, while > > > > under FreeBSD there are ioctls provided by pci driver. I've been doing > > > > some code migration from linux to FreeBSD, and got thru most of it, except > > > > for things like this one: > > > > > > You are probably doing something very wrong here, but rather than try to > > > convince you to do it, right, I'll just answer your question. 8) > > > > 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? :-) 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. -- Regs, Alexey To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message