Date: Mon, 15 Dec 2008 21:54:23 +0000 (UTC) From: Wilko Bulte <wilko@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r186142 - head/sys/pci Message-ID: <200812152154.mBFLsNJ2017882@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: wilko Date: Mon Dec 15 21:54:23 2008 New Revision: 186142 URL: http://svn.freebsd.org/changeset/base/186142 Log: 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 Modified: head/sys/pci/if_rl.c Modified: head/sys/pci/if_rl.c ============================================================================== --- head/sys/pci/if_rl.c Mon Dec 15 21:50:54 2008 (r186141) +++ head/sys/pci/if_rl.c Mon Dec 15 21:54:23 2008 (r186142) @@ -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)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200812152154.mBFLsNJ2017882>