From owner-freebsd-hackers Thu Aug 19 12:24:32 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from dingo.cdrom.com (dingo.cdrom.com [204.216.28.145]) by hub.freebsd.org (Postfix) with ESMTP id F006A14E32 for ; Thu, 19 Aug 1999 12:24:27 -0700 (PDT) (envelope-from mike@dingo.cdrom.com) Received: from dingo.cdrom.com (localhost.cdrom.com [127.0.0.1]) by dingo.cdrom.com (8.9.3/8.8.8) with ESMTP id MAA07455; Thu, 19 Aug 1999 12:17:51 -0700 (PDT) (envelope-from mike@dingo.cdrom.com) Message-Id: <199908191917.MAA07455@dingo.cdrom.com> X-Mailer: exmh version 2.0.2 2/24/98 To: "David E. Cross" Cc: freebsd-hackers@freebsd.org Subject: Re: PCI programming woes. In-reply-to: Your message of "Thu, 19 Aug 1999 11:13:36 EDT." <199908191513.LAA92421@cs.rpi.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 19 Aug 1999 12:17:51 -0700 From: Mike Smith Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > I am trying to write a very kludgey/monolithic driver for a CardBus ethernet > adapter. I have run into a bit of a stumbling block on some issues. One such > issue is the attach (I need to map some registers of the adapter into memory > space so I can read/write values.). Anyway if someone could explain some > of the following I would be very thankfull. You're making life far too hard for yourself. FreeBSD doesn't reward you for trying to kludge things; the infrastructure you're looking for wants you to be using our bus interfaces. Have a look at pmap_mapdev() for what you're trying to do. > Take your average run-to-the mill PCI network driver... like FPA or FXP. Now > look for the attach routines... there are *2* of them, with the exact same > function name, and different arguments?!?! You're picking bad examples to work with, since both those drivers support multiple operating systems. Try a much cleaner driver like, eg. if_tl. -- \\ The mind's the standard \\ Mike Smith \\ of the man. \\ msmith@freebsd.org \\ -- Joseph Merrick \\ msmith@cdrom.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message