summaryrefslogtreecommitdiffstats
path: root/sys/dev/nve
diff options
context:
space:
mode:
authorbz <bz@FreeBSD.org>2005-12-12 06:23:43 +0000
committerbz <bz@FreeBSD.org>2005-12-12 06:23:43 +0000
commitcc22e5c9bead00e367108238f2cf432e199c1678 (patch)
tree09a505706e5d752d644ac1950f2dedede8da8271 /sys/dev/nve
parenta7ea81a09f8ecb977a7c1b7b1d87b359e843c5dd (diff)
downloadFreeBSD-src-cc22e5c9bead00e367108238f2cf432e199c1678.zip
FreeBSD-src-cc22e5c9bead00e367108238f2cf432e199c1678.tar.gz
Make nve(4) work for people with nf3/nf4 who never got it
working at all and only saw "nve0: device timeout (N)" messages. - Setup PHY before handing control to NVidia API setting speed, duplex, enabling interrupts, etc. - Add restriction of MAXADDR_32BIT for high address to contigmalloc to make the driver work on machines with 4+GB of memory. PR: kern/85583, kern/88045 Tested by: scottl, others earlier version MFC after: 10 days
Diffstat (limited to 'sys/dev/nve')
-rw-r--r--sys/dev/nve/if_nve.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/dev/nve/if_nve.c b/sys/dev/nve/if_nve.c
index 434b04c..5fd8e8c 100644
--- a/sys/dev/nve/if_nve.c
+++ b/sys/dev/nve/if_nve.c
@@ -643,6 +643,8 @@ nve_init_locked(struct nve_softc *sc)
nve_stop(sc);
DEBUGOUT(NVE_DEBUG_INIT, "nve: do pfnInit\n");
+ nve_ifmedia_upd_locked(ifp);
+
/* Setup Hardware interface and allocate memory structures */
error = sc->hwapi->pfnInit(sc->hwapi->pADCX,
0, /* force speed */
@@ -663,7 +665,6 @@ nve_init_locked(struct nve_softc *sc)
/* Setup multicast filter */
nve_setmulti(sc);
- nve_ifmedia_upd_locked(ifp);
/* Update interface parameters */
ifp->if_drv_flags |= IFF_DRV_RUNNING;
@@ -1306,7 +1307,7 @@ nve_osalloc(PNV_VOID ctx, PMEMORY_BLOCK mem)
sc = (struct nve_softc *)ctx;
mem->pLogical = (PVOID)contigmalloc(mem->uiLength, M_DEVBUF,
- M_NOWAIT | M_ZERO, 0, ~0, PAGE_SIZE, 0);
+ M_NOWAIT | M_ZERO, 0, 0xffffffff, PAGE_SIZE, 0);
if (!mem->pLogical) {
device_printf(sc->dev, "memory allocation failed\n");
OpenPOWER on IntegriCloud