aboutsummaryrefslogtreecommitdiff
path: root/sys/pci
diff options
context:
space:
mode:
authorWilko Bulte <wilko@FreeBSD.org>2008-12-15 21:54:23 +0000
committerWilko Bulte <wilko@FreeBSD.org>2008-12-15 21:54:23 +0000
commit98bfb5b2016850a962961c3947c1a0d5d18ab32e (patch)
tree5c72e023a7eda5f0405059fcbce8bcb6786c21e0 /sys/pci
parentfc384fa5d6106e9c7429d142141bd04df3040394 (diff)
downloadsrc-98bfb5b2016850a962961c3947c1a0d5d18ab32e.tar.gz
src-98bfb5b2016850a962961c3947c1a0d5d18ab32e.zip
By default assume a 8139 chip if the EEPROM contents prove inconclusive. The
same LOM hardware with goofed-up EEPROM programming also needed reading the Ethernet address from the chips registers as the EEPROM did not have a sensible address programmed. Patch developed by: pyun@ Funky hardware on loan: www.id-it.nl MFC after: 2 weeks
Notes
Notes: svn path=/head/; revision=186142
Diffstat (limited to 'sys/pci')
-rw-r--r--sys/pci/if_rl.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/sys/pci/if_rl.c b/sys/pci/if_rl.c
index 71866ce89a88..d11d5d91ba42 100644
--- a/sys/pci/if_rl.c
+++ b/sys/pci/if_rl.c
@@ -901,9 +901,15 @@ rl_attach(device_t dev)
}
if (sc->rl_type == 0) {
- device_printf(dev, "unknown device ID: %x\n", rl_did);
- error = ENXIO;
- goto fail;
+ device_printf(dev, "unknown device ID: %x assuming 8139\n",
+ rl_did);
+ sc->rl_type = RL_8139;
+ /*
+ * Read RL_IDR register to get ethernet address as accessing
+ * EEPROM may not extract correct address.
+ */
+ for (i = 0; i < ETHER_ADDR_LEN; i++)
+ eaddr[i] = CSR_READ_1(sc, RL_IDR0 + i);
}
if ((error = rl_dma_alloc(sc)) != 0)