Workaround to prevent VMware from melting down. The pseudo PCnet interface
in VMware reports 0x00000000 in the PCI subsystem ID register, but 0x10001000 when you read the mirror registers in I/O space. This causes pcn_probe() to think it's found a card in 32-bit mode, and performing a 32-bit I/O access makes on a 16-bit port makes VMware go boom. Special case the 0x10001000 value until somebody at VMware grows a clue. Finally discovered by: Andrew Gallatin
This commit is contained in:
parent
7d42e30c2e
commit
e979bff557
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user