From patchwork Tue Nov 17 00:51:24 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Doug Anderson X-Patchwork-Id: 7631581 Return-Path: X-Original-To: patchwork-linux-rockchip@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id BCF39BF90C for ; Tue, 17 Nov 2015 00:52:23 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E525A2053C for ; Tue, 17 Nov 2015 00:52:22 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9D7EF20532 for ; Tue, 17 Nov 2015 00:52:21 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZyUVR-0002IP-9z; Tue, 17 Nov 2015 00:52:21 +0000 Received: from mail-pa0-x235.google.com ([2607:f8b0:400e:c03::235]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZyUVH-00026w-3j for linux-rockchip@lists.infradead.org; Tue, 17 Nov 2015 00:52:13 +0000 Received: by pacej9 with SMTP id ej9so85139298pac.2 for ; Mon, 16 Nov 2015 16:51:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; bh=Zy5+JelvnClD1dGb/HIMSUPr1sHKcy/CM3KPcLZ6qbw=; b=PFIqR421dDpv89D+paks5SBbf0Mp+0YSeUZI9CVhiXkMg6tQ7OjuOPBc3gqTHycvXS psBbCh+uoFMrao1Az2+A9ZMvmy9GeHCcDxFGcc3d1sWpb3NateDV/IlonLlYr5UILnJ7 n58SU3Z0/WLzjL2WvPFlaXnjcRd6HYN7eBjws= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-type:content-transfer-encoding; bh=Zy5+JelvnClD1dGb/HIMSUPr1sHKcy/CM3KPcLZ6qbw=; b=duxenaTkJzZhqUTPKIkkf2J20fQtHP5Bn5wLQXm9qvqP6CBUVqRUQgzuLzZqEAz/uX uSaMxpKnetnCi1wAIoVjbQGNVGjfFmDSN6FSlL1lKUVhRRMDMWRj9jmRRr7KBz6SeXXi VfurFU7W1F5ULM9IP24P2uaWOyzmx5lPMdHzyEOaKNVEt6nMlIaYUa7Zp3lBjjgnJ2x7 YHSpue5T1QYlhaFlyjJ5FDlbOuaydjs1xtVhvJ+QGLlmE66fLqs2r75IkLcydxWhhttQ orFESJvYNxkLbbSQUT0dr8iuUGwcxLonFUW3moaEwiahSA4dhsexCzJ4W16HKmka4DZH Qp3A== X-Gm-Message-State: ALoCoQlAn7h2URDDuHqp/XpvZYTsf1HeZaP127y44CilJDTDQKUnyC2cJsgyPsE0pyRiZcfiBC2M X-Received: by 10.68.69.2 with SMTP id a2mr2263745pbu.91.1447721510420; Mon, 16 Nov 2015 16:51:50 -0800 (PST) Received: from tictac.mtv.corp.google.com ([172.22.65.76]) by smtp.gmail.com with ESMTPSA id hg2sm16316243pbb.7.2015.11.16.16.51.49 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 16 Nov 2015 16:51:50 -0800 (PST) From: Douglas Anderson To: John Youn , balbi@ti.com Subject: [PATCH v3 8/8] usb: dwc2: host: Giveback URB in tasklet context Date: Mon, 16 Nov 2015 16:51:24 -0800 Message-Id: <1447721484-22548-9-git-send-email-dianders@chromium.org> X-Mailer: git-send-email 2.6.0.rc2.230.g3dd15c0 In-Reply-To: <1447721484-22548-1-git-send-email-dianders@chromium.org> References: <1447721484-22548-1-git-send-email-dianders@chromium.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20151116_165211_347631_01F0E393 X-CRM114-Status: GOOD ( 11.10 ) X-Spam-Score: -2.7 (--) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: gregory.herrero@intel.com, =?UTF-8?q?Heiko=20St=C3=BCbner?= , johnyoun@synopsys.com, gregkh@linuxfoundation.org, ming.lei@canonical.com, linux-usb@vger.kernel.org, Douglas Anderson , linux-kernel@vger.kernel.org, linux-rockchip@lists.infradead.org, yousaf.kaukab@intel.com, stern@rowland.harvard.edu, Yunzhi Li , Julius Werner , dinguyen@opensource.altera.com Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP In commit 94dfd7edfd5c ("USB: HCD: support giveback of URB in tasklet context") support was added to give back the URB in tasklet context. Let's take advantage of this in dwc2. This speeds up the dwc2 interrupt handler considerably. Note that this requires the change ("usb: dwc2: host: Add a delay before releasing periodic bandwidth") to come first. Signed-off-by: Douglas Anderson Tested-by: Heiko Stuebner --- Changes in v3: None Changes in v2: - Commit message now says that URB giveback change needs delay change. drivers/usb/dwc2/hcd.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/usb/dwc2/hcd.c b/drivers/usb/dwc2/hcd.c index 803992985935..5fc86aad542e 100644 --- a/drivers/usb/dwc2/hcd.c +++ b/drivers/usb/dwc2/hcd.c @@ -2266,9 +2266,7 @@ void dwc2_host_complete(struct dwc2_hsotg *hsotg, struct dwc2_qtd *qtd, kfree(qtd->urb); qtd->urb = NULL; - spin_unlock(&hsotg->lock); usb_hcd_giveback_urb(dwc2_hsotg_to_hcd(hsotg), urb, status); - spin_lock(&hsotg->lock); } /* @@ -2881,7 +2879,7 @@ static struct hc_driver dwc2_hc_driver = { .hcd_priv_size = sizeof(struct wrapper_priv_data), .irq = _dwc2_hcd_irq, - .flags = HCD_MEMORY | HCD_USB2, + .flags = HCD_MEMORY | HCD_USB2 | HCD_BH, .start = _dwc2_hcd_start, .stop = _dwc2_hcd_stop,