diff options
author | Niklas Hallqvist <niklas@cvs.openbsd.org> | 1999-05-19 14:04:05 +0000 |
---|---|---|
committer | Niklas Hallqvist <niklas@cvs.openbsd.org> | 1999-05-19 14:04:05 +0000 |
commit | 1e9a8d90aa265facdeae75a9d1ac49d3a399f7be (patch) | |
tree | b65028c56d2f758ee44ff6b216777f77cdd12349 /sys/dev/pcmcia/if_xe.c | |
parent | 22f7931d4735c0de73991f32e297168f32261f51 (diff) |
Make autoneg at boot work. some indent.
Diffstat (limited to 'sys/dev/pcmcia/if_xe.c')
-rw-r--r-- | sys/dev/pcmcia/if_xe.c | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/sys/dev/pcmcia/if_xe.c b/sys/dev/pcmcia/if_xe.c index 5d8bb2f7dba..3e849146ba0 100644 --- a/sys/dev/pcmcia/if_xe.c +++ b/sys/dev/pcmcia/if_xe.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_xe.c,v 1.2 1999/05/18 22:19:44 niklas Exp $ */ +/* $OpenBSD: if_xe.c,v 1.3 1999/05/19 14:04:04 niklas Exp $ */ /* * Copyright (c) 1999 Niklas Hallqvist, C Stone, Job de Haas @@ -343,16 +343,16 @@ xe_pcmcia_attach(parent, self, aux) } bus_space_write_1(pcmh.memt, pcmh.memh, - ccr_offset + PCMCIA_CCR_DCOR0, PCMCIA_CCR_DCOR0_SFINT); + ccr_offset + PCMCIA_CCR_DCOR0, PCMCIA_CCR_DCOR0_SFINT); bus_space_write_1(pcmh.memt, pcmh.memh, - ccr_offset + PCMCIA_CCR_DCOR1, - PCMCIA_CCR_DCOR1_FORCE_LEVIREQ | PCMCIA_CCR_DCOR1_D6); + ccr_offset + PCMCIA_CCR_DCOR1, + PCMCIA_CCR_DCOR1_FORCE_LEVIREQ | PCMCIA_CCR_DCOR1_D6); bus_space_write_1(pcmh.memt, pcmh.memh, - ccr_offset + PCMCIA_CCR_DCOR2, 0); + ccr_offset + PCMCIA_CCR_DCOR2, 0); bus_space_write_1(pcmh.memt, pcmh.memh, - ccr_offset + PCMCIA_CCR_DCOR3, 0); + ccr_offset + PCMCIA_CCR_DCOR3, 0); bus_space_write_1(pcmh.memt, pcmh.memh, - ccr_offset + PCMCIA_CCR_DCOR4, 0); + ccr_offset + PCMCIA_CCR_DCOR4, 0); /* We don't need them anymore and can free them (I think). */ pcmcia_mem_unmap(pf, ccr_window); @@ -426,10 +426,17 @@ xe_pcmcia_attach(parent, self, aux) /* * Reset and initialize the card again for DINGO (as found in Linux * driver). Without this Dingo will get a watchdog timeout the first - * time. + * time. The ugly media tickling seems to be necessary for getting + * autonegotiation to work too. */ - if (sc->sc_flags & XEF_DINGO) + if (sc->sc_flags & XEF_DINGO) { xe_full_reset(sc); + xe_init(sc); + ifmedia_set(&sc->sc_mii.mii_media, IFM_ETHER | IFM_AUTO); + ifmedia_set(&sc->sc_mii.mii_media, IFM_ETHER | IFM_NONE); + xe_stop(sc); + } + #ifdef notyet /* |