diff options
Diffstat (limited to 'sys/dev/pci/if_nfe.c')
-rw-r--r-- | sys/dev/pci/if_nfe.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/sys/dev/pci/if_nfe.c b/sys/dev/pci/if_nfe.c index c88250efca1..b711d837ad9 100644 --- a/sys/dev/pci/if_nfe.c +++ b/sys/dev/pci/if_nfe.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_nfe.c,v 1.23 2006/02/10 03:54:54 brad Exp $ */ +/* $OpenBSD: if_nfe.c,v 1.24 2006/02/11 09:15:57 damien Exp $ */ /*- * Copyright (c) 2006 Damien Bergamini <damien.bergamini@free.fr> @@ -954,7 +954,7 @@ int nfe_init(struct ifnet *ifp) { struct nfe_softc *sc = ifp->if_softc; - uint32_t rxtxctl; + uint32_t tmp, rxtxctl; if (ifp->if_flags & IFF_RUNNING) return 0; @@ -990,6 +990,13 @@ nfe_init(struct ifnet *ifp) (NFE_RX_RING_COUNT - 1) << 16 | (NFE_TX_RING_COUNT - 1)); + /* force MAC to wakeup */ + tmp = NFE_READ(sc, NFE_PWR_STATE); + NFE_WRITE(sc, NFE_PWR_STATE, tmp | NFE_PWR_WAKEUP); + DELAY(10); + tmp = NFE_READ(sc, NFE_PWR_STATE); + NFE_WRITE(sc, NFE_PWR_STATE, tmp | NFE_PWR_VALID); + NFE_WRITE(sc, NFE_SETUP_R1, NFE_R1_MAGIC); NFE_WRITE(sc, NFE_SETUP_R2, NFE_R2_MAGIC); NFE_WRITE(sc, NFE_TIMER_INT, 970); /* XXX Magic */ |