summaryrefslogtreecommitdiffstats
path: root/sys/pci
diff options
context:
space:
mode:
Diffstat (limited to 'sys/pci')
-rw-r--r--sys/pci/if_pcn.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/sys/pci/if_pcn.c b/sys/pci/if_pcn.c
index eced632..6bf15e0 100644
--- a/sys/pci/if_pcn.c
+++ b/sys/pci/if_pcn.c
@@ -440,8 +440,16 @@ static int pcn_probe(dev)
chip_id = pcn_bcr_read16(sc, PCN_BCR_PCISUBSYSID);
chip_id <<= 16;
chip_id |= pcn_bcr_read16(sc, PCN_BCR_PCISUBVENID);
+ /*
+ * Note III: the test for 0x10001000 is a hack to
+ * pacify VMware, who's pseudo-PCnet interface is
+ * broken. Reading the subsystem register from PCI
+ * config space yeilds 0x00000000 while reading the
+ * same value from I/O space yeilds 0x10001000. It's
+ * not supposed to be that way.
+ */
if (chip_id == pci_read_config(dev,
- PCIR_SUBVEND_0, 4)) {
+ PCIR_SUBVEND_0, 4) || chip_id == 0x10001000) {
/* We're in 16-bit mode. */
chip_id = pcn_csr_read16(sc, PCN_CSR_CHIPID1);
chip_id <<= 16;
OpenPOWER on IntegriCloud