[PATCH v3 5/6] usb: musb: Introduce musb_start_urb()

From: matwey . kornilov
Date: Tue Apr 21 2020 - 09:31:14 EST


From: "Matwey V. Kornilov" <matwey@xxxxxxxxxx>

This function allows us to start arbitrary urb.

Signed-off-by: Matwey V. Kornilov <matwey@xxxxxxxxxx>
---
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 c3c9aa8ba973..46d9dd7d6f67 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.25.0