From owner-p4-projects@FreeBSD.ORG Fri Mar 17 21:00:13 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id AC4B216A422; Fri, 17 Mar 2006 21:00:13 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8A4D616A401 for ; Fri, 17 Mar 2006 21:00:13 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 365BC43D49 for ; Fri, 17 Mar 2006 21:00:13 +0000 (GMT) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k2HL0DYO013878 for ; Fri, 17 Mar 2006 21:00:13 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k2HL0CmU013875 for perforce@freebsd.org; Fri, 17 Mar 2006 21:00:12 GMT (envelope-from imp@freebsd.org) Date: Fri, 17 Mar 2006 21:00:12 GMT Message-Id: <200603172100.k2HL0CmU013875@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 93467 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Mar 2006 21:00:14 -0000 http://perforce.freebsd.org/chv.cgi?CH=93467 Change 93467 by imp@imp_Speedy on 2006/03/17 20:59:57 We need to lock around the Tx path of the ISR. In addition, when we can send more packets, we need to clear OACTIVE and call the start routine... # this gets me reliably every time to the nfs panic on pagein # when init is run. No idea what that bug is. Affected files ... .. //depot/projects/arm/src/sys/arm/at91/if_ate.c#41 edit Differences ... ==== //depot/projects/arm/src/sys/arm/at91/if_ate.c#41 (text+ko) ==== @@ -681,6 +681,7 @@ } } if (status & ETH_ISR_TCOM) { + ATE_LOCK(sc); if (sc->sent_mbuf[0]) m_freem(sc->sent_mbuf[0]); if (sc->sent_mbuf[1]) { @@ -697,6 +698,13 @@ sc->sent_mbuf[0] = NULL; sc->txcur = 0; } + /* + * We're no longer busy, so clear the busy flag and call the + * start routine to xmit more packets. + */ + sc->ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; + atestart_locked(sc->ifp); + ATE_UNLOCK(sc); } if (status & ETH_ISR_RBNA) { /* Workaround Errata #11 */