From c0198b7da71600250c5ab933c9bbddc26b6df813 Mon Sep 17 00:00:00 2001 From: gibbs Date: Thu, 13 Aug 1998 19:12:20 +0000 Subject: Use "baseclass" instead of "class" for storing the contents of PCI register 0xB so that C++ programs can use the PCI conf interface. --- sys/dev/pci/pci.c | 9 +++++---- sys/dev/pci/pcivar.h | 4 ++-- sys/pci/pci.c | 9 +++++---- sys/pci/pcivar.h | 4 ++-- 4 files changed, 14 insertions(+), 12 deletions(-) (limited to 'sys') diff --git a/sys/dev/pci/pci.c b/sys/dev/pci/pci.c index daa235a..2dac6de 100644 --- a/sys/dev/pci/pci.c +++ b/sys/dev/pci/pci.c @@ -23,7 +23,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: pci.c,v 1.83 1998/06/07 17:12:42 dfr Exp $ + * $Id: pci.c,v 1.84 1998/07/22 08:40:46 dfr Exp $ * */ @@ -199,7 +199,7 @@ pci_fixancient(pcicfgregs *cfg) return; /* PCI to PCI bridges use header type 1 */ - if (cfg->class == PCIC_BRIDGE && cfg->subclass == PCIS_BRIDGE_PCI) + if (cfg->baseclass == PCIC_BRIDGE && cfg->subclass == PCIS_BRIDGE_PCI) cfg->hdrtype = 1; } @@ -326,7 +326,7 @@ pci_readcfg(pcicfgregs *probe) cfg->device = pci_cfgread(cfg, PCIR_DEVICE, 2); cfg->cmdreg = pci_cfgread(cfg, PCIR_COMMAND, 2); cfg->statreg = pci_cfgread(cfg, PCIR_STATUS, 2); - cfg->class = pci_cfgread(cfg, PCIR_CLASS, 1); + cfg->baseclass = pci_cfgread(cfg, PCIR_CLASS, 1); cfg->subclass = pci_cfgread(cfg, PCIR_SUBCLASS, 1); cfg->progif = pci_cfgread(cfg, PCIR_PROGIF, 1); cfg->revid = pci_cfgread(cfg, PCIR_REVID, 1); @@ -402,7 +402,8 @@ pci_addcfg(pcicfgregs *cfg) printf("found->\tvendor=0x%04x, dev=0x%04x, revid=0x%02x\n", cfg->vendor, cfg->device, cfg->revid); printf("\tclass=%02x-%02x-%02x, hdrtype=0x%02x, mfdev=%d\n", - cfg->class, cfg->subclass, cfg->progif, cfg->hdrtype, cfg->mfdev); + cfg->baseclass, cfg->subclass, cfg->progif, + cfg->hdrtype, cfg->mfdev); #ifdef PCI_DEBUG printf("\tcmdreg=0x%04x, statreg=0x%04x, cachelnsz=%d (dwords)\n", cfg->cmdreg, cfg->statreg, cfg->cachelnsz); diff --git a/sys/dev/pci/pcivar.h b/sys/dev/pci/pcivar.h index f624678..3d0afd4 100644 --- a/sys/dev/pci/pcivar.h +++ b/sys/dev/pci/pcivar.h @@ -26,7 +26,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: pcivar.h,v 1.18 1997/08/21 08:31:41 fsmp Exp $ + * $Id: pcivar.h,v 1.19 1998/07/22 08:39:08 dfr Exp $ * */ @@ -78,7 +78,7 @@ typedef struct pcicfg { u_int16_t cmdreg; /* disable/enable chip and PCI options */ u_int16_t statreg; /* supported PCI features and error state */ - u_int8_t class; /* chip PCI class */ + u_int8_t baseclass; /* chip PCI class */ u_int8_t subclass; /* chip PCI subclass */ u_int8_t progif; /* chip PCI programming interface */ u_int8_t revid; /* chip revision ID */ diff --git a/sys/pci/pci.c b/sys/pci/pci.c index daa235a..2dac6de 100644 --- a/sys/pci/pci.c +++ b/sys/pci/pci.c @@ -23,7 +23,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: pci.c,v 1.83 1998/06/07 17:12:42 dfr Exp $ + * $Id: pci.c,v 1.84 1998/07/22 08:40:46 dfr Exp $ * */ @@ -199,7 +199,7 @@ pci_fixancient(pcicfgregs *cfg) return; /* PCI to PCI bridges use header type 1 */ - if (cfg->class == PCIC_BRIDGE && cfg->subclass == PCIS_BRIDGE_PCI) + if (cfg->baseclass == PCIC_BRIDGE && cfg->subclass == PCIS_BRIDGE_PCI) cfg->hdrtype = 1; } @@ -326,7 +326,7 @@ pci_readcfg(pcicfgregs *probe) cfg->device = pci_cfgread(cfg, PCIR_DEVICE, 2); cfg->cmdreg = pci_cfgread(cfg, PCIR_COMMAND, 2); cfg->statreg = pci_cfgread(cfg, PCIR_STATUS, 2); - cfg->class = pci_cfgread(cfg, PCIR_CLASS, 1); + cfg->baseclass = pci_cfgread(cfg, PCIR_CLASS, 1); cfg->subclass = pci_cfgread(cfg, PCIR_SUBCLASS, 1); cfg->progif = pci_cfgread(cfg, PCIR_PROGIF, 1); cfg->revid = pci_cfgread(cfg, PCIR_REVID, 1); @@ -402,7 +402,8 @@ pci_addcfg(pcicfgregs *cfg) printf("found->\tvendor=0x%04x, dev=0x%04x, revid=0x%02x\n", cfg->vendor, cfg->device, cfg->revid); printf("\tclass=%02x-%02x-%02x, hdrtype=0x%02x, mfdev=%d\n", - cfg->class, cfg->subclass, cfg->progif, cfg->hdrtype, cfg->mfdev); + cfg->baseclass, cfg->subclass, cfg->progif, + cfg->hdrtype, cfg->mfdev); #ifdef PCI_DEBUG printf("\tcmdreg=0x%04x, statreg=0x%04x, cachelnsz=%d (dwords)\n", cfg->cmdreg, cfg->statreg, cfg->cachelnsz); diff --git a/sys/pci/pcivar.h b/sys/pci/pcivar.h index f624678..3d0afd4 100644 --- a/sys/pci/pcivar.h +++ b/sys/pci/pcivar.h @@ -26,7 +26,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: pcivar.h,v 1.18 1997/08/21 08:31:41 fsmp Exp $ + * $Id: pcivar.h,v 1.19 1998/07/22 08:39:08 dfr Exp $ * */ @@ -78,7 +78,7 @@ typedef struct pcicfg { u_int16_t cmdreg; /* disable/enable chip and PCI options */ u_int16_t statreg; /* supported PCI features and error state */ - u_int8_t class; /* chip PCI class */ + u_int8_t baseclass; /* chip PCI class */ u_int8_t subclass; /* chip PCI subclass */ u_int8_t progif; /* chip PCI programming interface */ u_int8_t revid; /* chip revision ID */ -- cgit v1.1