Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp1206083ybi; Fri, 14 Jun 2019 10:23:34 -0700 (PDT) X-Google-Smtp-Source: APXvYqw8cZCyVwlf+amFKxYoxulV+9remm/OZGwNhh9FJxEPEGlyetJO4BXYuQUzQlnyQQyVLM1Q X-Received: by 2002:a65:64d6:: with SMTP id t22mr34150322pgv.406.1560533013879; Fri, 14 Jun 2019 10:23:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560533013; cv=none; d=google.com; s=arc-20160816; b=OA3WIMW9BQ71+uvYCJMoo3hEO34w2bOy/yXJMwwN7DL57GGnSLvfwYwHGL07D2K2kT KnOLjoK+9PHArGpT/M2S2G0WKRtj+gHV/GtB8PzGku4hJIdTvgzU+Bd7urc2lB1mZC97 zGTTVLpdu72Nan154/mD4a/Ooy2T1+BHkD8sDMwbkX5M5/0oB5oouJhnOWd6UQx0fBEY sRDYD0/QqgL9yRvudUSv7sZeUpGegxgRbIGDksvd63sPa87dSz31yRBsKJUQ84iHPw/3 +q1K/IIeGJFX1BVtVQiQfZu1gkr0FZiXWg2A+97QqkO3sBOOy3VHfwvzDYLe9IxkQ1fM USvA== 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=yb6mO1b+Rhy+8lZ1NZEW7AFFq3k4dfRKOyJ+7/M2tXuvDVuQ5WV+XFixmPKuuglW8O 6l1cH7gfa7Ku2JOOkopEHd6ctAE2rL5JgGhy24k3eYaX3LrJCpUERCJ97wzEYwy42ek3 VDwkcg89m6qlXx5LnhNWoppI4YfSY2lIZh1cDslQ8WXDRrzlSyo7FLaJr29FM6LMnqWQ iT/GAVgH6xEE+bg8zygrnYofE8HK2SbK92z9jJHJQXFyG1UpzZXsgKRXVAuRqQxk0DsM tAPjyFN4H1V4xRUwlvI4IRpFzi2q0ErlJtqYiMm+iXsk3e1iSSTP/zh/mD+xYob6FjoJ DZjQ== 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 62si1943455pff.216.2019.06.14.10.23.19; Fri, 14 Jun 2019 10:23:33 -0700 (PDT) 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 S1726329AbfFNRXK (ORCPT + 99 others); Fri, 14 Jun 2019 13:23:10 -0400 Received: from lnfm1.sai.msu.ru ([93.180.26.255]:50801 "EHLO lnfm1.sai.msu.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725837AbfFNRXI (ORCPT ); Fri, 14 Jun 2019 13:23:08 -0400 X-Greylist: delayed 2129 seconds by postgrey-1.27 at vger.kernel.org; Fri, 14 Jun 2019 13:23:05 EDT 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 x5EGlAZb020158; Fri, 14 Jun 2019 19:47:15 +0300 Received: from oak.local (unknown [92.243.181.209]) (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 7FE5D86C92; Fri, 14 Jun 2019 19:47:08 +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 v2 5/6] usb: musb: Introduce musb_start_urb() Date: Fri, 14 Jun 2019 19:45:53 +0300 Message-Id: <20190614164554.27679-6-matwey@sai.msu.ru> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20190614164554.27679-1-matwey@sai.msu.ru> References: <20190403185310.8437-1-matwey@sai.msu.ru> <20190614164554.27679-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