From owner-svn-src-head@FreeBSD.ORG Tue Mar 31 19:20:04 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 600151065675; Tue, 31 Mar 2009 19:20:04 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3D4638FC1C; Tue, 31 Mar 2009 19:20:04 +0000 (UTC) (envelope-from imp@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 n2VJK4Xq008065; Tue, 31 Mar 2009 19:20:04 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n2VJK4Wu008064; Tue, 31 Mar 2009 19:20:04 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <200903311920.n2VJK4Wu008064@svn.freebsd.org> From: Warner Losh Date: Tue, 31 Mar 2009 19:20:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r190597 - head/sys/dev/ed X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Mar 2009 19:20:04 -0000 Author: imp Date: Tue Mar 31 19:20:03 2009 New Revision: 190597 URL: http://svn.freebsd.org/changeset/base/190597 Log: It turns out that the initialization is required since it sets up the readout of the MAC address. The 10ms delay was really needed. Ooops. Modified: head/sys/dev/ed/if_ed_pccard.c Modified: head/sys/dev/ed/if_ed_pccard.c ============================================================================== --- head/sys/dev/ed/if_ed_pccard.c Tue Mar 31 18:25:09 2009 (r190596) +++ head/sys/dev/ed/if_ed_pccard.c Tue Mar 31 19:20:03 2009 (r190597) @@ -751,6 +751,7 @@ ed_probe_ax88x90_generic(device_t dev, i char test_buffer[32]; ed_pccard_ax88x90_reset(sc); + DELAY(10*1000); /* Make sure that we really have an 8390 based board */ if (!ed_probe_generic8390(sc)) @@ -807,6 +808,29 @@ static int ed_pccard_ax88x90_enaddr(struct ed_softc *sc) { int i, j; + struct { + unsigned char offset, value; + } pg_seq[] = { + /* Select Page0 */ + {ED_P0_CR, ED_CR_RD2 | ED_CR_STP | ED_CR_PAGE_0}, + {ED_P0_DCR, ED_DCR_WTS}, /* Word access to SRAM */ + {ED_P0_RBCR0, 0x00}, /* Clear the count regs. */ + {ED_P0_RBCR1, 0x00}, + {ED_P0_IMR, 0x00}, /* Mask completion irq. */ + {ED_P0_ISR, 0xff}, /* ACK them all */ + {ED_P0_RCR, ED_RCR_MON | ED_RCR_INTT}, /* Set To Monitor */ + {ED_P0_TCR, ED_TCR_LB0}, /* loopback mode. */ + {ED_P0_RBCR0, 0x20}, /* 32byte DMA */ + {ED_P0_RBCR1, 0x00}, + {ED_P0_RSAR0, 0x00}, /* Read address is 0x0400 */ + {ED_P0_RSAR1, 0x04}, /* for MAC ADDR */ + {ED_P0_CR, ED_CR_RD0 | ED_CR_STA | ED_CR_PAGE_0}, + }; + + /* Card Settings */ + for (i = 0; i < sizeof(pg_seq) / sizeof(pg_seq[0]); i++) + ed_nic_outb(sc, pg_seq[i].offset, pg_seq[i].value); + /* Get MAC address */ for (i = 0; i < ETHER_ADDR_LEN; i += 2) { j = ed_asic_inw(sc, 0);