Subject: Re: PCI device driver interface changes
To: Chris G Demetriou <Chris_G_Demetriou@UX2.SP.CS.CMU.EDU>
From: Charles M. Hannum <>
List: current-users
Date: 03/27/1996 00:45:48
		   u_int           pa_intrswiz;
		   pcitag_t        pa_intrtag;

You haven't specified what these two values *are*.

	   This function is always successful.  If the arguments are
	   invalid, behaviour is undefined.

Those two statements seem to conflict.  If the input values don't make
any sense, doing something is almost certainly worse than panicking,
and doing nothing could allow a bug to go unnoticed or some more
obscure error to occur.

   void            *pci_intr_establish __P((pci_chipset_tag_t pc,
		       pci_intr_handle_t ih, int level, int (*func)(void *),
		       void *arg)); 

Doesn't PCI allow for both level- and edge-triggered interrupts?  I
think this also needs an IST_* constant.

   int     pci_mem_find __P((pci_chipset_tag_t pc, pcitag_t tag, int off,
	       bus_mem_addr_t *membase, bus_mem_size_t *memsize,
	       int *cacheable));

	   Examine the PCI configuration space Base Address register at
	   offset 'off' in the configuration space of the device named by
	   'pc' and 'tag,' and fill in the variables pointed to by
	   'membase' and 'memsize' with the information found there.
	   'off' must be 4-byte aligned

Does it return a physical or virtual address?  How do I convert
between the two?