From patchwork Wed Nov 4 22:53:04 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Douglas Anderson X-Patchwork-Id: 7555771 Return-Path: X-Original-To: patchwork-linux-rockchip@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 5B2469F2F7 for ; Wed, 4 Nov 2015 22:54:07 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 70C35207FD for ; Wed, 4 Nov 2015 22:54:06 +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 05A95207F9 for ; Wed, 4 Nov 2015 22:54:05 +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 1Zu6wO-00080T-OH; Wed, 04 Nov 2015 22:54:04 +0000 Received: from mail-pa0-x229.google.com ([2607:f8b0:400e:c03::229]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Zu6wM-0007vz-3e for linux-rockchip@lists.infradead.org; Wed, 04 Nov 2015 22:54:03 +0000 Received: by pasz6 with SMTP id z6so67915732pas.2 for ; Wed, 04 Nov 2015 14:53:41 -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; bh=boNJCiHhG8OvHP8rmH6oWY+FPrPVFefA+SvIdSJxhD8=; b=B3mbmP1T6J+NKmjm1t7njfAu+tF9UlYW86VQXsS+E/B8esPviIg8ptcJSD83+G1xuJ YIEs/1SeIhQUa8qnIN5d/rILDAoD4PeYS6xqUBlCLEUlnIk+GjXIFmJl6VTXfY4wF6J6 0/TzHzq0D858oYRIUlmnzZkNkpfSR4bqg2ayc= 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; bh=boNJCiHhG8OvHP8rmH6oWY+FPrPVFefA+SvIdSJxhD8=; b=mx1eogfMkT5/m7Qst9m5bE9eq1dbTh+8X2XzESqMzZy2cWgtciJ9Bs6KQ3KBudS3Rx p5ny+fUz5sgZ4qJg4CXlhudlEGUfZVJfQqWJYelgkmkO4lIYclCPUVkPCWT5hNpL5S0q BTnhe2ij/Mwceeg5yHBbQepF0GifLj3zYDGaFcK9PhO2LqZz/9CnWY/gPvfhc42UkZeO w8s1SbKR2in7CTQXRHTnGrYdZdQgkeYIoDl2gots1Lvmu7zxmvJBPci3YK0BOLBB/f/U VHd7s/K22D2ym40pQWJiBCf5zrzIq81To6vihJ9fyZRTwp+6rMdNtSjEo0w17opq0QyT WZUg== X-Gm-Message-State: ALoCoQkhB91vhTBtSDj6VBGepFkb84VU6s0/6MbCUHi427rt4aGL8DWzo81fqMS+5NvuQ0HzOCK0 X-Received: by 10.66.155.197 with SMTP id vy5mr3097123pab.109.1446677621158; Wed, 04 Nov 2015 14:53:41 -0800 (PST) Received: from tictac.mtv.corp.google.com ([172.22.65.76]) by smtp.gmail.com with ESMTPSA id ff2sm4023956pac.14.2015.11.04.14.53.39 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 04 Nov 2015 14:53:40 -0800 (PST) From: Douglas Anderson To: John Youn , balbi@ti.com Subject: [PATCH 2/3] usb: dwc2: host: Giveback URB in tasklet context Date: Wed, 4 Nov 2015 14:53:04 -0800 Message-Id: <1446677585-28582-3-git-send-email-dianders@chromium.org> X-Mailer: git-send-email 2.6.0.rc2.230.g3dd15c0 In-Reply-To: <1446677585-28582-1-git-send-email-dianders@chromium.org> References: <1446677585-28582-1-git-send-email-dianders@chromium.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20151104_145402_290936_6D221A2A X-CRM114-Status: UNSURE ( 9.88 ) X-CRM114-Notice: Please train this message. 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, linux-usb@vger.kernel.org, Douglas Anderson , linux-kernel@vger.kernel.org, linux-rockchip@lists.infradead.org, yousaf.kaukab@intel.com, Yunzhi Li , Julius Werner , dinguyen@opensource.altera.com MIME-Version: 1.0 Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED, T_DKIM_INVALID, T_RP_MATCHES_RCVD, 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. Signed-off-by: Douglas Anderson --- 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 e79baf73c234..9e7988950c7a 100644 --- a/drivers/usb/dwc2/hcd.c +++ b/drivers/usb/dwc2/hcd.c @@ -2273,9 +2273,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); } /* @@ -2888,7 +2886,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,