From owner-svn-src-all@FreeBSD.ORG Wed Jun 3 14:52:34 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 95DF7A8D; Wed, 3 Jun 2015 14:52:34 +0000 (UTC) (envelope-from araujobsdport@gmail.com) Received: from mail-ob0-x22f.google.com (mail-ob0-x22f.google.com [IPv6:2607:f8b0:4003:c01::22f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 59CFF1BC6; Wed, 3 Jun 2015 14:52:34 +0000 (UTC) (envelope-from araujobsdport@gmail.com) Received: by obcnx10 with SMTP id nx10so9577582obc.2; Wed, 03 Jun 2015 07:52:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=2zbt0wbcdTsuFZnGTIJDUJef2akQqoLNN6ASSgGAEbc=; b=nZZxZu2dHIfSmgp61X4Tnii3u/Qo1B017TQSu+qJuzJfL4L2Asp86EY48aCv4mCvTr b4GGKYpkectjb8VBG+SEYz2ohwJmLVHCaTYvuT7r+5D3Ho4piwGt3cGeBYUJDHQGRNxt 5/oT8OYZmPPKoq5ZY5nVgk4Rsh1CRtBSxt+kjKw1LkkbHXysqcYi/MnlE9BIOU6cdhgz DYZyBapoAKEkJDp3Hd+MHFqxTjO9LZ7N7Xn3MOvsVU7IFAGLmkJZtpEtQD9BTp7M6qhG 50qgYvrZ7Y8BD46gEyACh0qU8PsKHh1CtCgrrH6ypGxtQ1fxb/fB2vbeuTalr+rINEKU Ohog== MIME-Version: 1.0 X-Received: by 10.60.93.42 with SMTP id cr10mr20601921oeb.74.1433343153747; Wed, 03 Jun 2015 07:52:33 -0700 (PDT) Received: by 10.202.11.193 with HTTP; Wed, 3 Jun 2015 07:52:33 -0700 (PDT) Received: by 10.202.11.193 with HTTP; Wed, 3 Jun 2015 07:52:33 -0700 (PDT) Reply-To: araujo@FreeBSD.org In-Reply-To: <201506031448.t53Em4Gn090709@svn.freebsd.org> References: <201506031448.t53Em4Gn090709@svn.freebsd.org> Date: Wed, 3 Jun 2015 22:52:33 +0800 Message-ID: Subject: Re: svn commit: r283948 - head/sys/dev/dwc From: Marcelo Araujo To: Luiz Otavio O Souza Cc: svn-src-head@freebsd.org, src-committers@freebsd.org, svn-src-all@freebsd.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jun 2015 14:52:34 -0000 Oi, fp = sc->ifp; Deveria ser: ifp = sc->ifp; []s On Jun 3, 2015 10:48 PM, "Luiz Otavio O Souza" wrote: > Author: loos > Date: Wed Jun 3 14:48:03 2015 > New Revision: 283948 > URL: https://svnweb.freebsd.org/changeset/base/283948 > > Log: > Fix the OACTIVE handling on if_dwc. > > Previously the OACTIVE flag was being set when the tx descriptors are > fully > allocated but it wasn't unset anywhere. > > As soon as a packet is transmitted, unset the OACTIVE flag and call start > routine to push any pending packets from the tx queue. > > This closes another race where a full tx queue would jam the tx path (tx > queue is full, new packets cannot be added to queue and dwc_txstart never > gets called). > > Modified: > head/sys/dev/dwc/if_dwc.c > > Modified: head/sys/dev/dwc/if_dwc.c > > ============================================================================== > --- head/sys/dev/dwc/if_dwc.c Wed Jun 3 14:07:50 2015 (r283947) > +++ head/sys/dev/dwc/if_dwc.c Wed Jun 3 14:48:03 2015 (r283948) > @@ -741,9 +741,11 @@ dwc_txfinish_locked(struct dwc_softc *sc > { > struct dwc_bufmap *bmap; > struct dwc_hwdesc *desc; > + struct ifnet *ifp; > > DWC_ASSERT_LOCKED(sc); > > + fp = sc->ifp; > while (sc->tx_idx_tail != sc->tx_idx_head) { > desc = &sc->txdesc_ring[sc->tx_idx_tail]; > if ((desc->tdes0 & DDESC_TDES0_OWN) != 0) > @@ -756,6 +758,7 @@ dwc_txfinish_locked(struct dwc_softc *sc > bmap->mbuf = NULL; > dwc_setup_txdesc(sc, sc->tx_idx_tail, 0, 0); > sc->tx_idx_tail = next_txidx(sc, sc->tx_idx_tail); > + ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; > } > > /* If there are no buffers outstanding, muzzle the watchdog. */ > @@ -838,8 +841,10 @@ dwc_intr(void *arg) > if (reg & DMA_STATUS_RI) > dwc_rxfinish_locked(sc); > > - if (reg & DMA_STATUS_TI) > + if (reg & DMA_STATUS_TI) { > dwc_txfinish_locked(sc); > + dwc_txstart_locked(sc); > + } > } > > if (reg & DMA_STATUS_AIS) { > _______________________________________________ > svn-src-head@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/svn-src-head > To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebsd.org" >