From owner-freebsd-hackers Fri Jan 19 10:10:50 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id KAA02297 for hackers-outgoing; Fri, 19 Jan 1996 10:10:50 -0800 (PST) Received: from mail11.digital.com (mail11.digital.com [192.208.46.10]) by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id KAA02290 for ; Fri, 19 Jan 1996 10:10:46 -0800 (PST) Received: from muggsy.lkg.dec.com by mail11.digital.com (5.65v3.2/1.0/WV) id AA18975; Fri, 19 Jan 1996 12:48:37 -0500 Received: from whydos.lkg.dec.com by muggsy.lkg.dec.com (5.65/DEC-Ultrix/4.3) with SMTP id AA15817; Fri, 19 Jan 1996 12:48:33 -0500 Received: from localhost (localhost [127.0.0.1]) by whydos.lkg.dec.com (8.6.11/8.6.9) with SMTP id RAA24416; Fri, 19 Jan 1996 17:56:48 GMT Message-Id: <199601191756.RAA24416@whydos.lkg.dec.com> X-Authentication-Warning: whydos.lkg.dec.com: Host localhost didn't use HELO protocol To: hsu@clinet.fi Cc: hackers@freebsd.org Subject: Re: kern/950: Two PCI bridge chips fail (multiple multiport ethernet boards) In-Reply-To: Your message of "Fri, 19 Jan 1996 00:18:36 +0100." <199601182318.AA11772@Sysiphos> X-Mailer: exmh version 1.5omega 10/6/94 Date: Fri, 19 Jan 1996 17:56:40 +0000 From: Matt Thomas Sender: owner-hackers@freebsd.org Precedence: bulk This is due to a typo in pcireg.h (to which I am probably the guilty party). The following diffs against 2.1.0-RELEASE should fix the problem. Matt Thomas Internet: matt@3am-software.com 3am Software Foundry WWW URL: http://www.3am-software.com/bio/matt.html Westford, MA Disclaimer: I disavow all knowledge of this message --- pcireg.h.orig Fri Jan 19 13:38:41 1996 +++ pcireg.h Fri Jan 19 13:30:46 1996 @@ -158,9 +158,9 @@ #define PCI_SECONDARY_BUS_MASK 0x0000ff00 #define PCI_PRIMARY_BUS_MASK 0x000000ff -#define PCI_SUBORDINATE_BUS_EXTRACT(x) (((x) > 16) & 0xff) -#define PCI_SECONDARY_BUS_EXTRACT(x) (((x) > 8) & 0xff) -#define PCI_PRIMARY_BUS_EXTRACT(x) (((x) ) & 0xff) +#define PCI_SUBORDINATE_BUS_EXTRACT(x) (((x) >> 16) & 0xff) +#define PCI_SECONDARY_BUS_EXTRACT(x) (((x) >> 8) & 0xff) +#define PCI_PRIMARY_BUS_EXTRACT(x) (((x) ) & 0xff) #define PCI_PRIMARY_BUS_INSERT(x, y) (((x) & ~PCI_PRIMARY_BUS_MASK) | ((y) << 0)) #define PCI_SECONDARY_BUS_INSERT(x, y) (((x) & ~PCI_SECONDARY_BUS_MASK) | ((y) << 8)) --- pcisupport.c.orig Sat Sep 9 23:10:21 1995 +++ pcisupport.c Fri Jan 19 11:59:39 1996 @@ -84,14 +84,14 @@ static char* chipset_probe (pcici_t tag, pcidi_t type) { - unsigned rev; + unsigned data; switch (type) { case 0x04868086: return ("Intel 82425EX PCI system controller"); case 0x04848086: - rev = (unsigned) pci_conf_read (tag, PCI_CLASS_REG) & 0xff; - if (rev == 3) + data = (unsigned) pci_conf_read (tag, PCI_CLASS_REG) & 0xff; + if (data == 3) return ("Intel 82378ZB PCI-ISA bridge"); return ("Intel 82378IB PCI-ISA bridge"); case 0x04838086: @@ -99,8 +99,8 @@ case 0x04828086: return ("Intel 82375EB PCI-EISA bridge"); case 0x04a38086: - rev = (unsigned) pci_conf_read (tag, PCI_CLASS_REG) & 0xff; - if (rev == 16 || rev == 17) + data = (unsigned) pci_conf_read (tag, PCI_CLASS_REG) & 0xff; + if (data == 16 || data == 17) return ("Intel 82434NX (Neptune) PCI cache memory controller"); return ("Intel 82434LX (Mercury) PCI cache memory controller"); case 0x122d8086: @@ -119,7 +119,12 @@ return ("SiS 85c601"); case 0x00011011: return ("DEC 21050 PCI-PCI bridge"); - }; + default: + data = pci_conf_read(tag, PCI_CLASS_REG); + if ((data & (PCI_CLASS_MASK|PCI_SUBCLASS_MASK)) == (PCI_CLASS_BRIDGE|PCI_SUBCLASS_BRIDGE_PCI)) + return ("PCI-PCI bridge"); + break; + } return ((char*)0); } --- pci.c.orig Mon Oct 9 06:35:59 1995 +++ pci.c Fri Jan 19 13:37:46 1996 @@ -364,7 +364,7 @@ */ pci_bridge_config (); - printf ("Probing for devices on the PCI bus:\n"); + printf ("Probing for devices on PCI bus %d:\n", pcicb->pcicb_bus); #ifndef PCI_QUIET if (bootverbose && !pci_info_done) { pci_info_done=1; @@ -603,7 +603,7 @@ if (bootverbose) { printf ("\tbridge from pci%d to pci%d through %d.\n", primary, secondary, subordinate); - printf ("\tmapping regs: io:%08lx mem:%08lx pmem:%08lx", + printf ("\tmapping regs: io:%08lx mem:%08lx pmem:%08lx\n", pci_conf_read (tag, PCI_PCI_BRIDGE_IO_REG), pci_conf_read (tag, PCI_PCI_BRIDGE_MEM_REG), pci_conf_read (tag, PCI_PCI_BRIDGE_PMEM_REG));