Subject: Re: byte-sized PCI conf regs?
To: None <M.Drochner@fz-juelich.de>
From: Chris G. Demetriou <cgd@netbsd.org>
List: tech-kern
Date: 09/20/1999 09:57:27
Matthias Drochner <drochner@zel459.zel.kfa-juelich.de> writes:
> toddpw@best.com said:
> > Is there a way to do the equivalent of pci_conf_{read,write} on a
> > single byte? 
> 
> No, it needs some shifting/masking/&/| to get this done.
> 
> (I believe config space accesses are "usually" idempotent,
> so it shouldn't be a problem.)

Right.  Further, reading of the PCI spec (PCI 2.2, section 3.2.2.3.5
and the surrounding sections) indicates that this should be OK, modulo
devices which mind having their bits written again to the same value.
(I've never seen one of those devices, though.)

It's worth noting that I do consider the current implementation of PCI
configuration space somewhat lacking, and fixing it is on my todo
list, but not particularly high...  8-)



cgd
-- 
Chris Demetriou - cgd@netbsd.org - http://www.netbsd.org/People/Pages/cgd.html
Disclaimer: Not speaking for NetBSD, just expressing my own opinion.