aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/ed
diff options
context:
space:
mode:
authorWarner Losh <imp@FreeBSD.org>2009-03-31 19:20:03 +0000
committerWarner Losh <imp@FreeBSD.org>2009-03-31 19:20:03 +0000
commit62382a43c06dcb945b30e2091cb3e681fcc044bf (patch)
tree79e63df5fa005f8967bf794c8372a7ef891d429e /sys/dev/ed
parent2365a961b19f0365da6af0fd4265b68cfd1be66c (diff)
Notes
Diffstat (limited to 'sys/dev/ed')
-rw-r--r--sys/dev/ed/if_ed_pccard.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/sys/dev/ed/if_ed_pccard.c b/sys/dev/ed/if_ed_pccard.c
index ecbcda38eabc..1f8119789249 100644
--- a/sys/dev/ed/if_ed_pccard.c
+++ b/sys/dev/ed/if_ed_pccard.c
@@ -751,6 +751,7 @@ ed_probe_ax88x90_generic(device_t dev, int flags)
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);