Subject: byte-sized PCI conf regs?
To: None <tech-kern@netbsd.org>
From: Todd Whitesel <toddpw@best.com>
List: tech-kern
Date: 09/20/1999 04:35:53
Is there a way to do the equivalent of pci_conf_{read,write} on a single
byte?

I'm trying to get at a device-specific register (which happens to be PCI conf
offset 0x40 if it matters) that is documented as being just a byte, and the
obvious

        i = pci_conf_read(pa->pa_pc, pa->pa_tag, 0x40);
        printf("PCI conf 0x40 was %#x\n", i);
        pci_conf_write(pa->pa_pc, pa->pa_tag, 0x40, 8);
        i = pci_conf_read(pa->pa_pc, pa->pa_tag, 0x40);
        printf("PCI conf 0x40 set to %#x\n", i);

earns me

PCI conf 0x40 was 0
PCI conf 0x40 set to 0

which is strange because there are supposed to be 4 1-byte registers
starting at 0x40, so I would expect to see something back...

Todd Whitesel
toddpw @ best.com