summaryrefslogtreecommitdiffstats
path: root/sys/amd64
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>1999-08-10 09:22:21 +0000
committerpeter <peter@FreeBSD.org>1999-08-10 09:22:21 +0000
commit8076722c425d631cf40c0f11bae560eec2d8cc35 (patch)
tree590bcbb35017fb3f5fa94f1eb4c94bc6fc53978d /sys/amd64
parent8c9b3c8625c37d333fc8cb94e9ba6c2ee2fa2e12 (diff)
downloadFreeBSD-src-8076722c425d631cf40c0f11bae560eec2d8cc35.zip
FreeBSD-src-8076722c425d631cf40c0f11bae560eec2d8cc35.tar.gz
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.
Diffstat (limited to 'sys/amd64')
-rw-r--r--sys/amd64/pci/pci_bus.c13
-rw-r--r--sys/amd64/pci/pci_cfgreg.c13
2 files changed, 14 insertions, 12 deletions
diff --git a/sys/amd64/pci/pci_bus.c b/sys/amd64/pci/pci_bus.c
index 944d106..a7b4e82 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 944d106..a7b4e82 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;
}
OpenPOWER on IntegriCloud