On Mon, Oct 05, 2009 at 10:26:32AM +0200, Mark Kettenis wrote: > > Date: Mon, 5 Oct 2009 09:51:39 +0200 > > From: Christopher Zimmermann <madro...@zakweb.de> > > > > rc = sis190_get_mac_addr_from_eeprom(pdev, dev); /* This seems to fail */ > > if (rc < 0) { > > u8 reg; > > > > pci_read_config_byte(pdev, 0x73, ®); /* How to do this in openBSD */ > > You can't really do byte-access on PCI config space. So to access the > byte at offset 0x73, you need to do something like: > > reg = (pci_conf(pa->pa_pc, pa->pa_tag, 0x70) >> 24);
pci_conf_read(), surely? ;) so: u_int8_t reg; reg = (pci_conf_read(pa->pa_pc, pa->pa_tag, 0x70) >> 24); Also, for completeness, if you want to change the byte then write it back, you need to do a read-modify-write cycle (read the word, OR in what you want to change, then write the whole thing out). Ta, -0- - just being a pain. -- A CONS is an object which cares. -- Bernie Greenberg.