Subject: Re: Writing a PCI device driver
To: Manuel Bouyer <>
From: Steven Grunza <>
List: tech-kern
Date: 07/26/2000 13:36:08
Hash: SHA1

I'm at the point now where config complains about *'d devices and

I've found the prototypes for a character device with:

If I use "jag* at pci? dev ? function ? " I get an error.

If I use "jag0 at pci? dev ? function ?
          jag1 at pci? dev ? function ?" it works.

Now to write the real driver code....

At 06:56 PM 7/26/00 +0200, Manuel Bouyer wrote:
>On Tue, Jul 25, 2000 at 02:44:09PM -0400, Steven Grunza wrote:
>> I'm writing a PCI device driver for a proprietary board.  It
>> really wants to be a STREAMS driver since the board is a network
>> interface card; however, NetBSD doesn't do STREAMS, yet....
>> Since the data packet size varies from a couple of characters to a
>> few hundred, I'm trying to structure the driver as a character
>> device.  I've written a character pseudo-driver for NetBSD but I'm
>> having some problems with the what happens after _attach().  My
>> driver currently finds my board, supposedly assigns an IRQ to it,
>> and then does nothing. 
>For what you want to do I guess your should't have a character
>pseudo-driver; it's your PCI driver which should have a /dev
>character device entry.  
>It's not really hard, I think you can just merge your pseudo-driver
>back in the PCI driver. You can for example look at the
>sys/dev/scsipi/uk.c driver. It's not a PCI one but also have an
>attach function. As far as the character device is concerned it
>should work the same way.
>Manuel Bouyer, LIP6, Universite Paris VI.          
> --

Version: PGPfreeware 6.5.3 for non-commercial use <>


"Luke, you're going to find that many | Steven Grunza
of the truths we cling to depend      | voice:  (856) 787 - 2759 
greatly on our own point of view."    | fax:    (856) 866 - 2033
 - Obi Wan Kenobi, Return of the Jedi | e-mail: