Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp476211yba; Wed, 3 Apr 2019 12:29:22 -0700 (PDT) X-Google-Smtp-Source: APXvYqzglL2E4xBBDpS7h867AAQrneel2eJXPVQO4lmj1BbKidE/l98QfuT8ZeqnbB231WMEAAXQ X-Received: by 2002:aa7:928d:: with SMTP id j13mr1277229pfa.112.1554319762363; Wed, 03 Apr 2019 12:29:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554319762; cv=none; d=google.com; s=arc-20160816; b=i3Q8iq0ZF6UD8rwDLq5Utr3AqhfYHAsgEj/mDeZtdB9ZwiC0gzk99j3W/Bqxoo8EDB dbZy6O00qi6xfQiagEjdU0ZMR+ds59tZ5UNlSQ9AuI/IJTxEumL/a/8aHwU3cdeBbQsN 8xMC7C5EWS7+CgayCwCJpsr7UkfeGp9tTzo5Wpk9wEijOKbEs8fDbE003PEsL4CbhQX8 oUERaPEkV9kOC5EeDEiR1ico+qxoEen4yg0DNK2+q/vErrMlzCJ5pBMbDApLVjSqk34R 3ItDzJ4te1UeB6Dh2DNt9Uev+yfUr98AEE3DbyWEpc+dVxIqh4mkdS8dWqUUy5C0/i9Y IYWA== 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:message-id:date :subject:cc:to:from; bh=L6HYjUYxfSmguNz+kAAiDvTzccAOsiuwmLl897vkDrM=; b=cKLF7rC/5/nne/vM/3GSOfTypCoqHjp86MGp2tBAw0lDAVMOkyR6oocEy9VowfEDbm +GJ4hUH9uBBr1AOruXvXhBXlO7b45rdUuyZywr8zfqYP+zvroUHCSKZL0I8I21D1efzM z5gB5qzIlOl7oQd4b0IKvbJkmbrBDEZ+R+O1+vrDf9uuycyZOM1J3pFZuLV+OQ05uJJw wSPu5wtKCcUrfQyifpOR2XgAKKvuNOzYWz8+Zt9WcyVsQ3IeN3bd5XbW5aHES08vBcQ+ cnRr4uaV0ATZLPcDT6gJgPvKFHnjM6PLf7Hp1xgO+Q4xA7IiqLcJudY1yl+aHUtTy7Qk vnUw== 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 h23si14275939pgv.190.2019.04.03.12.29.06; Wed, 03 Apr 2019 12:29:22 -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 S1726708AbfDCTZu (ORCPT + 99 others); Wed, 3 Apr 2019 15:25:50 -0400 Received: from lnfm1.sai.msu.ru ([93.180.26.255]:49521 "EHLO lnfm1.sai.msu.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726064AbfDCTZs (ORCPT ); Wed, 3 Apr 2019 15:25:48 -0400 X-Greylist: delayed 1904 seconds by postgrey-1.27 at vger.kernel.org; Wed, 03 Apr 2019 15:25:44 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 x33IraBA024086; Wed, 3 Apr 2019 21:53:41 +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 488167984F; Wed, 3 Apr 2019 21:53:36 +0300 (MSK) From: "Matwey V. Kornilov" To: b-liu@ti.com, gregkh@linuxfoundation.org Cc: matwey.kornilov@gmail.com, "Matwey V. Kornilov" , linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org Subject: [PATCH 5/6] usb: musb: Introduce musb_start_urb() Date: Wed, 3 Apr 2019 21:53:09 +0300 Message-Id: <20190403185310.8437-6-matwey@sai.msu.ru> X-Mailer: git-send-email 2.16.4 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