From owner-svn-src-all@FreeBSD.ORG Sun Oct 24 21:23:27 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A75A4106566B; Sun, 24 Oct 2010 21:23:27 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7ACF48FC0C; Sun, 24 Oct 2010 21:23:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o9OLNRve040558; Sun, 24 Oct 2010 21:23:27 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9OLNRnt040556; Sun, 24 Oct 2010 21:23:27 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201010242123.o9OLNRnt040556@svn.freebsd.org> From: Pyun YongHyeon Date: Sun, 24 Oct 2010 21:23:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r214298 - stable/8/sys/dev/usb/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 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: Sun, 24 Oct 2010 21:23:27 -0000 Author: yongari Date: Sun Oct 24 21:23:27 2010 New Revision: 214298 URL: http://svn.freebsd.org/changeset/base/214298 Log: MFC r213424: Make upper stack know driver's output status. This change increased TX performance from 221kpps to 231kpps. Modified: stable/8/sys/dev/usb/net/if_axe.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/usb/net/if_axe.c ============================================================================== --- stable/8/sys/dev/usb/net/if_axe.c Sun Oct 24 21:22:00 2010 (r214297) +++ stable/8/sys/dev/usb/net/if_axe.c Sun Oct 24 21:23:27 2010 (r214298) @@ -862,12 +862,15 @@ axe_bulk_write_callback(struct usb_xfer switch (USB_GET_STATE(xfer)) { case USB_ST_TRANSFERRED: DPRINTFN(11, "transfer complete\n"); + ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; /* FALLTHROUGH */ case USB_ST_SETUP: tr_setup: - if ((sc->sc_flags & AXE_FLAG_LINK) == 0) { + if ((sc->sc_flags & AXE_FLAG_LINK) == 0 || + (ifp->if_drv_flags & IFF_DRV_OACTIVE) != 0) { /* - * don't send anything if there is no link ! + * Don't send anything if there is no link or + * controller is busy. */ return; } @@ -938,6 +941,7 @@ tr_setup: usbd_xfer_set_frame_len(xfer, 0, pos); usbd_transfer_submit(xfer); + ifp->if_drv_flags |= IFF_DRV_OACTIVE; return; default: /* Error */ @@ -945,6 +949,7 @@ tr_setup: usbd_errstr(error)); ifp->if_oerrors++; + ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; if (error != USB_ERR_CANCELLED) { /* try to clear stall first */ @@ -1077,7 +1082,7 @@ axe_stop(struct usb_ether *ue) AXE_LOCK_ASSERT(sc, MA_OWNED); - ifp->if_drv_flags &= ~IFF_DRV_RUNNING; + ifp->if_drv_flags &= ~(IFF_DRV_RUNNING | IFF_DRV_OACTIVE); sc->sc_flags &= ~AXE_FLAG_LINK; /*