Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp16619876ybl; Wed, 1 Jan 2020 09:24:51 -0800 (PST) X-Google-Smtp-Source: APXvYqw722AREjVxUrKVv1f5UUPp9yN3SfFGzp9XhoOZhV2O0YRpb1IQt/RYzdDq0ATXbFfcZBj4 X-Received: by 2002:a9d:4d8d:: with SMTP id u13mr84739919otk.299.1577899491780; Wed, 01 Jan 2020 09:24:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577899491; cv=none; d=google.com; s=arc-20160816; b=HQ0ZHW8gfW8mER339pIbPwBift1aFjhf+LMpszAO7thndfpfvlKWngvr9Gsy41Pdoo YFVShpY10oRZhAwR5wYY8K9yQ2glibO8HKNz13DzN1crwXjKm+sy3LdK5pTj0cWxO79T gpMd57hXgjpCI+YewG3jotMTBlKTipBfwt/90mfrMw3jsd0tCAHomsFDjANVRMlM1bWu MJYPOva732WNbDKXGGSyaBPzjHo7SwXPWNGtLKH1wFKx1/Wu9ukx+IIQkqc5TDqB8e29 GoIJPfbUaeMdeixocpoh+Rh/GzSUPjkHPZwedMrv177cVxyMEcKcTHDZUNCHCkm5Xg4f RPQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from; bh=L6HYjUYxfSmguNz+kAAiDvTzccAOsiuwmLl897vkDrM=; b=H+s/haPmKkJSm3pv8c1eTcaO1do1bNPgFeHTVjIzzKkozNI/AVHjOxqP4tqckqgJ/n twWKQkaE5u0YM7DX9waXG/jaqggipNKHm4NrtazOJw9p5JluNenqm/vcmrvUmyKBAg7M tHnNsjC2tplXe377qUketyEKG3M2EVZWnBmdPveWAQLFS4CSR1Rd4FLdnSGQvjfh+IMG cfI00YU7k64LuZEwuxGPDcZ9bCOfbLpyj+VBr917Xn9ijsxztc+9tNzhHcT6AEL0xvAR tXGBudsuLrJjs4yDkUmD04d6tDTm3BLXjwb7MYBil7VW7PjU/IquG+Ew3besal2syt76 Zxlg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v124si19752005oib.173.2020.01.01.09.24.18; Wed, 01 Jan 2020 09:24:51 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727266AbgAARWm (ORCPT + 99 others); Wed, 1 Jan 2020 12:22:42 -0500 Received: from lnfm1.sai.msu.ru ([93.180.26.255]:35309 "EHLO lnfm1.sai.msu.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727215AbgAARWm (ORCPT ); Wed, 1 Jan 2020 12:22:42 -0500 X-Greylist: delayed 3350 seconds by postgrey-1.27 at vger.kernel.org; Wed, 01 Jan 2020 12:22:39 EST Received: from dragon.sai.msu.ru (dragon.sai.msu.ru [93.180.26.172]) by lnfm1.sai.msu.ru (8.14.1/8.12.8) with ESMTP id 001GQNNS001800; Wed, 1 Jan 2020 19:26:28 +0300 Received: from oak.local (unknown [188.123.231.178]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by dragon.sai.msu.ru (Postfix) with ESMTPSA id 07445106DD8; Wed, 1 Jan 2020 19:26:21 +0300 (MSK) From: "Matwey V. Kornilov" To: b-liu@ti.com, gregkh@linuxfoundation.org, stern@rowland.harvard.edu Cc: matwey.kornilov@gmail.com, "Matwey V. Kornilov" , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH RESEND v2 5/6] usb: musb: Introduce musb_start_urb() Date: Wed, 1 Jan 2020 19:26:09 +0300 Message-Id: <20200101162610.15819-6-matwey@sai.msu.ru> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20200101162610.15819-1-matwey@sai.msu.ru> References: <20200101162610.15819-1-matwey@sai.msu.ru> In-Reply-To: <20190403185310.8437-1-matwey@sai.msu.ru> References: <20190403185310.8437-1-matwey@sai.msu.ru> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This function allows us to start arbitrary urb. Signed-off-by: Matwey V. Kornilov --- drivers/usb/musb/musb_host.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/drivers/usb/musb/musb_host.c b/drivers/usb/musb/musb_host.c index 3a202a2a521d..ed99ecd4e63a 100644 --- a/drivers/usb/musb/musb_host.c +++ b/drivers/usb/musb/musb_host.c @@ -213,11 +213,10 @@ static struct musb_qh *musb_ep_get_qh(struct musb_hw_ep *ep, int is_in) * Context: controller locked, irqs blocked */ static void -musb_start_next_urb(struct musb *musb, int is_in, struct musb_qh *qh) +musb_start_urb(struct musb *musb, int is_in, struct musb_qh *qh, struct urb *urb) { u32 len; void __iomem *mbase = musb->mregs; - struct urb *urb = next_urb(qh); void *buf = urb->transfer_buffer; u32 offset = 0; struct musb_hw_ep *hw_ep = qh->hw_ep; @@ -293,6 +292,14 @@ musb_start_next_urb(struct musb *musb, int is_in, struct musb_qh *qh) } } +static void +musb_start_next_urb(struct musb *musb, int is_in, struct musb_qh *qh) +{ + struct urb *urb = next_urb(qh); + + musb_start_urb(musb, is_in, qh, urb); +} + /* Context: caller owns controller lock, IRQs are blocked */ static void musb_giveback(struct musb *musb, struct urb *urb, int status) __releases(musb->lock) -- 2.16.4