From patchwork Thu Feb 27 19:49:57 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Balbi X-Patchwork-Id: 25473 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ob0-f199.google.com (mail-ob0-f199.google.com [209.85.214.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id C4CDA20543 for ; Thu, 27 Feb 2014 19:51:41 +0000 (UTC) Received: by mail-ob0-f199.google.com with SMTP id wo20sf2014878obc.2 for ; Thu, 27 Feb 2014 11:51:41 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe:content-type; bh=nl+xFQafWTLrNBaUKSGXGk6O6ZJJW0NdpCu87gCUqKo=; b=DmAk76VJeZwFT5nYO08gqLLf6aLLD6cSLCpg7OuZNr5CiGa8BqbRvkh2BIoRVBJadc 7XhU/M+7qJ6E3sEb37i67ifrtqSvuMS4XILt4SDm7OW1vcXhv5as8PJ+ibesct/56Q7C 2tyyEQNckFKB0JDb3NZo9FvbSBFaPRbgg3Ir/Hh1KZl4Zjc0is1+1b8Jm4O/vywdNTEg pMKfwGBYBjBEyHpXgssxSdRLILGeMit0rLGSNnJ4uEOKg1Qdbuk4sFZCIhgNfyZKufVq yqFGVpx0fXQ8nwSelwu2vCQuJTCrLikxo6jCY3xMXHrksyKump+fymYSQrtoIZMAd8yp 89qA== X-Gm-Message-State: ALoCoQkriWRaEZxGzeDOLs9zTiuMNZhYVPK0rktYdiDBvB9m7K+TZMRTyXDEgOC+q+ENlsPeZAQ5 X-Received: by 10.50.26.65 with SMTP id j1mr3281830igg.7.1393530701284; Thu, 27 Feb 2014 11:51:41 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.30.8 with SMTP id c8ls793416qgc.56.gmail; Thu, 27 Feb 2014 11:51:41 -0800 (PST) X-Received: by 10.58.123.70 with SMTP id ly6mr12067083veb.26.1393530701024; Thu, 27 Feb 2014 11:51:41 -0800 (PST) Received: from mail-ve0-f170.google.com (mail-ve0-f170.google.com [209.85.128.170]) by mx.google.com with ESMTPS id l16si1551487vcl.126.2014.02.27.11.51.41 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 27 Feb 2014 11:51:41 -0800 (PST) Received-SPF: neutral (google.com: 209.85.128.170 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.170; Received: by mail-ve0-f170.google.com with SMTP id pa12so2773339veb.15 for ; Thu, 27 Feb 2014 11:51:40 -0800 (PST) X-Received: by 10.221.66.73 with SMTP id xp9mr3321987vcb.27.1393530700942; Thu, 27 Feb 2014 11:51:40 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.130.193 with SMTP id u1csp1517vcs; Thu, 27 Feb 2014 11:51:40 -0800 (PST) X-Received: by 10.66.248.227 with SMTP id yp3mr16821984pac.116.1393530700126; Thu, 27 Feb 2014 11:51:40 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id yo5si352357pab.34.2014.02.27.11.51.39; Thu, 27 Feb 2014 11:51:39 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-usb-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753291AbaB0Tve (ORCPT + 3 others); Thu, 27 Feb 2014 14:51:34 -0500 Received: from arroyo.ext.ti.com ([192.94.94.40]:42558 "EHLO arroyo.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753162AbaB0Tvc (ORCPT ); Thu, 27 Feb 2014 14:51:32 -0500 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by arroyo.ext.ti.com (8.13.7/8.13.7) with ESMTP id s1RJpVNR030159 for ; Thu, 27 Feb 2014 13:51:31 -0600 Received: from DLEE70.ent.ti.com (dlemailx.itg.ti.com [157.170.170.113]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id s1RJpVWo026894 for ; Thu, 27 Feb 2014 13:51:31 -0600 Received: from dflp33.itg.ti.com (10.64.6.16) by DLEE70.ent.ti.com (157.170.170.113) with Microsoft SMTP Server id 14.3.174.1; Thu, 27 Feb 2014 13:51:31 -0600 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp33.itg.ti.com (8.14.3/8.13.8) with ESMTP id s1RJpU9w022970; Thu, 27 Feb 2014 13:51:31 -0600 From: Felipe Balbi To: Linux USB Mailing List CC: Felipe Balbi Subject: [PATCH 8/8] usb: dwc3: gadget: always enable IOC on bulk/interrupt transfers Date: Thu, 27 Feb 2014 13:49:57 -0600 Message-ID: <1393530597-12259-8-git-send-email-balbi@ti.com> X-Mailer: git-send-email 1.9.0 In-Reply-To: <1393530597-12259-1-git-send-email-balbi@ti.com> References: <1393530597-12259-1-git-send-email-balbi@ti.com> MIME-Version: 1.0 Sender: linux-usb-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-usb@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: balbi@ti.com X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.170 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , by setting IOC always, we can recycle TRBs a lot sooner at the expense of some increased CPU load. The extra load seems to be quite minimal on OMAP5 devices (instead of 1 IRQ for one MSC transfer, we get CONFIG_USB_GADGET_STORAGE_NUM_BUFFERS). Signed-off-by: Felipe Balbi --- drivers/usb/dwc3/gadget.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index 2da0a5a..9e878d9 100644 --- a/drivers/usb/dwc3/gadget.c +++ b/drivers/usb/dwc3/gadget.c @@ -771,9 +771,6 @@ static void dwc3_prepare_one_trb(struct dwc3_ep *dep, trb->ctrl = DWC3_TRBCTL_ISOCHRONOUS_FIRST; else trb->ctrl = DWC3_TRBCTL_ISOCHRONOUS; - - if (!req->request.no_interrupt && !chain) - trb->ctrl |= DWC3_TRB_CTRL_IOC; break; case USB_ENDPOINT_XFER_BULK: @@ -788,6 +785,9 @@ static void dwc3_prepare_one_trb(struct dwc3_ep *dep, BUG(); } + if (!req->request.no_interrupt && !chain) + trb->ctrl |= DWC3_TRB_CTRL_IOC; + if (usb_endpoint_xfer_isoc(dep->endpoint.desc)) { trb->ctrl |= DWC3_TRB_CTRL_ISP_IMI; trb->ctrl |= DWC3_TRB_CTRL_CSP; @@ -1855,9 +1855,6 @@ static int dwc3_cleanup_done_reqs(struct dwc3 *dwc, struct dwc3_ep *dep, return 1; } - if ((event->status & DEPEVT_STATUS_IOC) && - (trb->ctrl & DWC3_TRB_CTRL_IOC)) - return 0; return 1; }