aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorPeter Wemm <peter@FreeBSD.org>1999-08-10 09:22:21 +0000
committerPeter Wemm <peter@FreeBSD.org>1999-08-10 09:22:21 +0000
commitaccc665bbef3a853c4c24d9879d9f0e17f037195 (patch)
tree0c8d527367002327e67ad548436f282045e83c2b /sys
parent4562af8f9bf05e88bb4dd08c7cf775aff25a75e6 (diff)
downloadsrc-accc665bbef3a853c4c24d9879d9f0e17f037195.tar.gz
src-accc665bbef3a853c4c24d9879d9f0e17f037195.zip
Hopefully fix the previous commit, it caused *all* bridges to be detected
as PCI->HOST bridges on my (440BX) box. My change is to remove the test at the beginning entirely, letting the switch on the device ID happen first. If the device ID is unknown, then (in the default case) check for the generic PCIS_BRIDGE_HOST tag. This should allow wierd cases (eg: wpaul's IMS VL bridge) to work by using the id override. This strategy is more in line with the other PCI match methods we use elsewhere, I only have a limited testbed, but having my USB etc devices detected as PCI->HOST bridges doesn't look good.
Notes
Notes: svn path=/head/; revision=49601
Diffstat (limited to 'sys')
-rw-r--r--sys/amd64/pci/pci_bus.c13
-rw-r--r--sys/amd64/pci/pci_cfgreg.c13
-rw-r--r--sys/i386/isa/pcibus.c13
-rw-r--r--sys/i386/pci/pci_bus.c13
-rw-r--r--sys/i386/pci/pci_cfgreg.c13
-rw-r--r--sys/i386/pci/pci_pir.c13
6 files changed, 42 insertions, 36 deletions
diff --git a/sys/amd64/pci/pci_bus.c b/sys/amd64/pci/pci_bus.c
index 944d1066685f..a7b4e82ac941 100644
--- a/sys/amd64/pci/pci_bus.c
+++ b/sys/amd64/pci/pci_bus.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: pcibus.c,v 1.44 1999/08/04 13:38:24 peter Exp $
+ * $Id: pcibus.c,v 1.45 1999/08/09 21:12:18 wpaul Exp $
*
*/
@@ -277,9 +277,6 @@ nexus_pcib_is_host_bridge(pcicfgregs *cfg,
const char *s = NULL;
static u_int8_t pxb[4]; /* hack for 450nx */
- if ((class != PCIC_BRIDGE) && (subclass != PCIS_BRIDGE_HOST))
- return NULL;
-
*busnum = 0;
switch (id) {
@@ -389,17 +386,21 @@ nexus_pcib_is_host_bridge(pcicfgregs *cfg,
s = "OPTi 82C822 host to PCI Bridge";
break;
- /* Ross (?) -- vendor 0x1166 */
+ /* Ross (?) -- vendor 0x1166 */
case 0x00051166:
s = "Ross (?) host to PCI bridge";
/* just guessing the secondary bus register number ... */
*busnum = pci_cfgread(cfg, 0x45, 1);
break;
+
+ /* Integrated Micro Solutions -- vendor 0x10e0 */
case 0x884910e0:
s = "Integrated Micro Solutions VL Bridge";
break;
+
default:
- s = "Host to PCI bridge";
+ if (class == PCIC_BRIDGE && subclass == PCIS_BRIDGE_HOST)
+ s = "Host to PCI bridge";
break;
}
diff --git a/sys/amd64/pci/pci_cfgreg.c b/sys/amd64/pci/pci_cfgreg.c
index 944d1066685f..a7b4e82ac941 100644
--- a/sys/amd64/pci/pci_cfgreg.c
+++ b/sys/amd64/pci/pci_cfgreg.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: pcibus.c,v 1.44 1999/08/04 13:38:24 peter Exp $
+ * $Id: pcibus.c,v 1.45 1999/08/09 21:12:18 wpaul Exp $
*
*/
@@ -277,9 +277,6 @@ nexus_pcib_is_host_bridge(pcicfgregs *cfg,
const char *s = NULL;
static u_int8_t pxb[4]; /* hack for 450nx */
- if ((class != PCIC_BRIDGE) && (subclass != PCIS_BRIDGE_HOST))
- return NULL;
-
*busnum = 0;
switch (id) {
@@ -389,17 +386,21 @@ nexus_pcib_is_host_bridge(pcicfgregs *cfg,
s = "OPTi 82C822 host to PCI Bridge";
break;
- /* Ross (?) -- vendor 0x1166 */
+ /* Ross (?) -- vendor 0x1166 */
case 0x00051166:
s = "Ross (?) host to PCI bridge";
/* just guessing the secondary bus register number ... */
*busnum = pci_cfgread(cfg, 0x45, 1);
break;
+
+ /* Integrated Micro Solutions -- vendor 0x10e0 */
case 0x884910e0:
s = "Integrated Micro Solutions VL Bridge";
break;
+
default:
- s = "Host to PCI bridge";
+ if (class == PCIC_BRIDGE && subclass == PCIS_BRIDGE_HOST)
+ s = "Host to PCI bridge";
break;
}
diff --git a/sys/i386/isa/pcibus.c b/sys/i386/isa/pcibus.c
index 944d1066685f..a7b4e82ac941 100644
--- a/sys/i386/isa/pcibus.c
+++ b/sys/i386/isa/pcibus.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: pcibus.c,v 1.44 1999/08/04 13:38:24 peter Exp $
+ * $Id: pcibus.c,v 1.45 1999/08/09 21:12:18 wpaul Exp $
*
*/
@@ -277,9 +277,6 @@ nexus_pcib_is_host_bridge(pcicfgregs *cfg,
const char *s = NULL;
static u_int8_t pxb[4]; /* hack for 450nx */
- if ((class != PCIC_BRIDGE) && (subclass != PCIS_BRIDGE_HOST))
- return NULL;
-
*busnum = 0;
switch (id) {
@@ -389,17 +386,21 @@ nexus_pcib_is_host_bridge(pcicfgregs *cfg,
s = "OPTi 82C822 host to PCI Bridge";
break;
- /* Ross (?) -- vendor 0x1166 */
+ /* Ross (?) -- vendor 0x1166 */
case 0x00051166:
s = "Ross (?) host to PCI bridge";
/* just guessing the secondary bus register number ... */
*busnum = pci_cfgread(cfg, 0x45, 1);
break;
+
+ /* Integrated Micro Solutions -- vendor 0x10e0 */
case 0x884910e0:
s = "Integrated Micro Solutions VL Bridge";
break;
+
default:
- s = "Host to PCI bridge";
+ if (class == PCIC_BRIDGE && subclass == PCIS_BRIDGE_HOST)
+ s = "Host to PCI bridge";
break;
}
diff --git a/sys/i386/pci/pci_bus.c b/sys/i386/pci/pci_bus.c
index 944d1066685f..a7b4e82ac941 100644
--- a/sys/i386/pci/pci_bus.c
+++ b/sys/i386/pci/pci_bus.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: pcibus.c,v 1.44 1999/08/04 13:38:24 peter Exp $
+ * $Id: pcibus.c,v 1.45 1999/08/09 21:12:18 wpaul Exp $
*
*/
@@ -277,9 +277,6 @@ nexus_pcib_is_host_bridge(pcicfgregs *cfg,
const char *s = NULL;
static u_int8_t pxb[4]; /* hack for 450nx */
- if ((class != PCIC_BRIDGE) && (subclass != PCIS_BRIDGE_HOST))
- return NULL;
-
*busnum = 0;
switch (id) {
@@ -389,17 +386,21 @@ nexus_pcib_is_host_bridge(pcicfgregs *cfg,
s = "OPTi 82C822 host to PCI Bridge";
break;
- /* Ross (?) -- vendor 0x1166 */
+ /* Ross (?) -- vendor 0x1166 */
case 0x00051166:
s = "Ross (?) host to PCI bridge";
/* just guessing the secondary bus register number ... */
*busnum = pci_cfgread(cfg, 0x45, 1);
break;
+
+ /* Integrated Micro Solutions -- vendor 0x10e0 */
case 0x884910e0:
s = "Integrated Micro Solutions VL Bridge";
break;
+
default:
- s = "Host to PCI bridge";
+ if (class == PCIC_BRIDGE && subclass == PCIS_BRIDGE_HOST)
+ s = "Host to PCI bridge";
break;
}
diff --git a/sys/i386/pci/pci_cfgreg.c b/sys/i386/pci/pci_cfgreg.c
index 944d1066685f..a7b4e82ac941 100644
--- a/sys/i386/pci/pci_cfgreg.c
+++ b/sys/i386/pci/pci_cfgreg.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: pcibus.c,v 1.44 1999/08/04 13:38:24 peter Exp $
+ * $Id: pcibus.c,v 1.45 1999/08/09 21:12:18 wpaul Exp $
*
*/
@@ -277,9 +277,6 @@ nexus_pcib_is_host_bridge(pcicfgregs *cfg,
const char *s = NULL;
static u_int8_t pxb[4]; /* hack for 450nx */
- if ((class != PCIC_BRIDGE) && (subclass != PCIS_BRIDGE_HOST))
- return NULL;
-
*busnum = 0;
switch (id) {
@@ -389,17 +386,21 @@ nexus_pcib_is_host_bridge(pcicfgregs *cfg,
s = "OPTi 82C822 host to PCI Bridge";
break;
- /* Ross (?) -- vendor 0x1166 */
+ /* Ross (?) -- vendor 0x1166 */
case 0x00051166:
s = "Ross (?) host to PCI bridge";
/* just guessing the secondary bus register number ... */
*busnum = pci_cfgread(cfg, 0x45, 1);
break;
+
+ /* Integrated Micro Solutions -- vendor 0x10e0 */
case 0x884910e0:
s = "Integrated Micro Solutions VL Bridge";
break;
+
default:
- s = "Host to PCI bridge";
+ if (class == PCIC_BRIDGE && subclass == PCIS_BRIDGE_HOST)
+ s = "Host to PCI bridge";
break;
}
diff --git a/sys/i386/pci/pci_pir.c b/sys/i386/pci/pci_pir.c
index 944d1066685f..a7b4e82ac941 100644
--- a/sys/i386/pci/pci_pir.c
+++ b/sys/i386/pci/pci_pir.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: pcibus.c,v 1.44 1999/08/04 13:38:24 peter Exp $
+ * $Id: pcibus.c,v 1.45 1999/08/09 21:12:18 wpaul Exp $
*
*/
@@ -277,9 +277,6 @@ nexus_pcib_is_host_bridge(pcicfgregs *cfg,
const char *s = NULL;
static u_int8_t pxb[4]; /* hack for 450nx */
- if ((class != PCIC_BRIDGE) && (subclass != PCIS_BRIDGE_HOST))
- return NULL;
-
*busnum = 0;
switch (id) {
@@ -389,17 +386,21 @@ nexus_pcib_is_host_bridge(pcicfgregs *cfg,
s = "OPTi 82C822 host to PCI Bridge";
break;
- /* Ross (?) -- vendor 0x1166 */
+ /* Ross (?) -- vendor 0x1166 */
case 0x00051166:
s = "Ross (?) host to PCI bridge";
/* just guessing the secondary bus register number ... */
*busnum = pci_cfgread(cfg, 0x45, 1);
break;
+
+ /* Integrated Micro Solutions -- vendor 0x10e0 */
case 0x884910e0:
s = "Integrated Micro Solutions VL Bridge";
break;
+
default:
- s = "Host to PCI bridge";
+ if (class == PCIC_BRIDGE && subclass == PCIS_BRIDGE_HOST)
+ s = "Host to PCI bridge";
break;
}