Date: Thu, 19 Aug 1999 12:17:51 -0700 From: Mike Smith <mike@smith.net.au> To: "David E. Cross" <crossd@cs.rpi.edu> Cc: freebsd-hackers@freebsd.org Subject: Re: PCI programming woes. Message-ID: <199908191917.MAA07455@dingo.cdrom.com> In-Reply-To: Your message of "Thu, 19 Aug 1999 11:13:36 EDT." <199908191513.LAA92421@cs.rpi.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199908191917.MAA07455>