From owner-svn-src-all@FreeBSD.ORG Sun Jan 11 16:21:33 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E89ED106566C; Sun, 11 Jan 2009 16:21:33 +0000 (UTC) (envelope-from wilko@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D63EA8FC20; Sun, 11 Jan 2009 16:21:33 +0000 (UTC) (envelope-from wilko@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0BGLXqo032973; Sun, 11 Jan 2009 16:21:33 GMT (envelope-from wilko@svn.freebsd.org) Received: (from wilko@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0BGLXVt032972; Sun, 11 Jan 2009 16:21:33 GMT (envelope-from wilko@svn.freebsd.org) Message-Id: <200901111621.n0BGLXVt032972@svn.freebsd.org> From: Wilko Bulte Date: Sun, 11 Jan 2009 16:21:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187057 - stable/7/sys/pci X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jan 2009 16:21:34 -0000 Author: wilko Date: Sun Jan 11 16:21:33 2009 New Revision: 187057 URL: http://svn.freebsd.org/changeset/base/187057 Log: MFC: r186142 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 Modified: stable/7/sys/pci/if_rl.c Modified: stable/7/sys/pci/if_rl.c ============================================================================== --- stable/7/sys/pci/if_rl.c Sun Jan 11 13:56:55 2009 (r187056) +++ stable/7/sys/pci/if_rl.c Sun Jan 11 16:21:33 2009 (r187057) @@ -857,9 +857,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); } /*