Skip to content

Commit

Permalink
By default assume a 8139 chip if the EEPROM contents prove inconclusi…
Browse files Browse the repository at this point in the history
…ve. 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
  • Loading branch information
wilko authored and wilko committed Dec 15, 2008
1 parent 03f6bb9 commit bf16388
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions sys/pci/if_rl.c
Expand Up @@ -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)
Expand Down

0 comments on commit bf16388

Please sign in to comment.