Subject: Re: pci_read_config_byte
To: Ed <garbageout@sbcglobal.net>
From: Allen Briggs <briggs@netbsd.org>
List: tech-kern
Date: 05/28/2005 13:50:30
On Sat, May 28, 2005 at 12:28:21PM -0500, Ed wrote:
> I'm borrowing some code from Linux.  What is the NetBSD equivalent of 
> the Linux functions pci_read_config_byte and pci_write_config_byte?  I 
> found pci_conf_read and pci_conf_write, but that seems to read and write 
> a whole dword.  If this is not the correct forum for kernel hacking, 
> please advise.  Thank you.

PCI doesn't have a config read or write for anything but 32-bit
quantities.  If you want to write a byte, you need to do the
read-modify-write for the 32-bit quantity that contains that byte.
The Linux functions probably just encapsulate that.

-allen

-- 
                  Use NetBSD!  http://www.NetBSD.org/