From owner-freebsd-current@FreeBSD.ORG Sat Dec 10 13:02:45 2005 Return-Path: X-Original-To: current@freebsd.org Delivered-To: freebsd-current@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 25C4316A41F for ; Sat, 10 Dec 2005 13:02:45 +0000 (GMT) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from transport.cksoft.de (transport.cksoft.de [62.111.66.27]) by mx1.FreeBSD.org (Postfix) with ESMTP id A1A9E43D62 for ; Sat, 10 Dec 2005 13:02:44 +0000 (GMT) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from transport.cksoft.de (localhost [127.0.0.1]) by transport.cksoft.de (Postfix) with ESMTP id 4EC041FF9AD for ; Sat, 10 Dec 2005 14:02:42 +0100 (CET) Received: by transport.cksoft.de (Postfix, from userid 66) id 7B4CC1FF9A6; Sat, 10 Dec 2005 14:02:39 +0100 (CET) Received: from maildrop.int.zabbadoz.net (maildrop.int.zabbadoz.net [10.111.66.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.int.zabbadoz.net (Postfix) with ESMTP id 40A6C444F50 for ; Sat, 10 Dec 2005 12:56:33 +0000 (UTC) Date: Sat, 10 Dec 2005 12:56:33 +0000 (UTC) From: "Bjoern A. Zeeb" X-X-Sender: bz@maildrop.int.zabbadoz.net To: FreeBSD current mailing list In-Reply-To: <20051209175607.C23668@maildrop.int.zabbadoz.net> Message-ID: <20051210125221.M23668@maildrop.int.zabbadoz.net> References: <20051209175607.C23668@maildrop.int.zabbadoz.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Virus-Scanned: by AMaViS cksoft-s20020300-20031204bz on transport.cksoft.de Cc: Subject: Re: nve(4) patch - please test! X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Dec 2005 13:02:45 -0000 On Fri, 9 Dec 2005, Bjoern A. Zeeb wrote: Hi, > everyone out there who had only seen timeouts like > nve0: device timeout (4) > on nve and __never got it working at all__ please try this patch[1] > which made my nve working from 0 to 99. > > I still can get timeouts by for example flood pinging another machine > on the local LAN but it all recovers on it's own and I can work on > that machine and do things like find / over ssh without losing > connectivity. Fixing the timeouts will be another problem that needs > to be addressed later. After removing hw.physmem="3G" from my loader.conf of my 4GB RAM machine I noticed that nve again was not working. Anyone with >= 4GB RAM might want to try the updated version of the patch which helps here. [1] http://sources.zabbadoz.net/freebsd/patchset/nve-20051210-01.diff Index: if_nve.c =================================================================== RCS file: /shared/mirror/FreeBSD/r/ncvs/src/sys/dev/nve/if_nve.c,v retrieving revision 1.19 diff -u -p -r1.19 if_nve.c --- if_nve.c 7 Dec 2005 17:38:03 -0000 1.19 +++ if_nve.c 10 Dec 2005 12:53:06 -0000 @@ -643,6 +643,10 @@ nve_init_locked(struct nve_softc *sc) nve_stop(sc); DEBUGOUT(NVE_DEBUG_INIT, "nve: do pfnInit\n"); + /* Setup multicast filter */ + nve_setmulti(sc); + nve_ifmedia_upd_locked(ifp); + /* Setup Hardware interface and allocate memory structures */ error = sc->hwapi->pfnInit(sc->hwapi->pADCX, 0, /* force speed */ @@ -661,10 +665,6 @@ nve_init_locked(struct nve_softc *sc) sc->hwapi->pfnEnableInterrupts(sc->hwapi->pADCX); sc->hwapi->pfnStart(sc->hwapi->pADCX); - /* Setup multicast filter */ - nve_setmulti(sc); - nve_ifmedia_upd_locked(ifp); - /* Update interface parameters */ ifp->if_drv_flags |= IFF_DRV_RUNNING; ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; @@ -1306,7 +1306,7 @@ nve_osalloc(PNV_VOID ctx, PMEMORY_BLOCK 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"); -- Bjoern A. Zeeb bzeeb at Zabbadoz dot NeT