Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp151643ybz; Tue, 21 Apr 2020 06:33:23 -0700 (PDT) X-Google-Smtp-Source: APiQypLqAZ/+WM/A1EkH7/MokbjBDNjPldONxREpWqqnHKL0O9Yij964N1Fvvgp6/AXv1r1ezt9N X-Received: by 2002:a17:906:5fd2:: with SMTP id k18mr20664686ejv.243.1587476003483; Tue, 21 Apr 2020 06:33:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587476003; cv=none; d=google.com; s=arc-20160816; b=Bjd9jz0S0SmbFCGYG1WyZxCJWl4WK2Ps9QMeNi9cDf3NhkZWlqGWY6+5z2SDl7rQiP 487cS6555tcbD6J/dBNldmjKP8b5CstLFRLBcThBRJXIQSAYW8gAYaweBNjJvfhgKNWW e0dHP4XE43yag8qYb5grnU7X1xyf0Ci35ngg2NlZZh3de2AG7u9ve0h7a6lIFwATHT47 7vFSkKi+TTf10bcbKbdlzKQK8KuEnI08QDO4gZhf+1dcSgML/zu7pguCrD4cQEx9ujRM dTd0J2Q1NlOde5hZvsxf3vckzt9eSzZO1qz5fd/D+rogafh6qEWtZjLQW7a/Xb+f+qi5 73Mg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=n1eN8tSv2qXvNukDnxakUVcpdfWKIz8N5kuJXZzI10Q=; b=d+CXpugzQkglH8LMJHa+6aaY5Mqkm437B0KiUuGfpl3KCAudsUiAcGfW/2KGsjBbR2 +IXJW5VAS9Axkf2D8OzHm5eY/5H6wHSA366PJWhyAd+QkwELoopYHTMyijYeR2e3fm1s XQ1g87VLRcIpmpBYFFSEmrkCnbdq+Mo+25JvwHFKDfxcVgcPilszJ/zkUVMs1ZeTG4DR 8WgCFKOe80z5Rr0KvvOWZ2RKKtwXaNeVLvUvcO1p8EUg92V2lfuL119/fFLKpfHWMP+I KFy0zPJX//d5YawI3mlw55of2jpQQAqzqbkEmChAhFFmKvHuWiwHTNzb5+v7Et+j6V3+ Adcw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=GS20hJWb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t20si1530943edq.412.2020.04.21.06.32.59; Tue, 21 Apr 2020 06:33:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=GS20hJWb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729084AbgDUNbK (ORCPT + 99 others); Tue, 21 Apr 2020 09:31:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39608 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1729032AbgDUNbD (ORCPT ); Tue, 21 Apr 2020 09:31:03 -0400 Received: from mail-lj1-x243.google.com (mail-lj1-x243.google.com [IPv6:2a00:1450:4864:20::243]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DEE37C061A10; Tue, 21 Apr 2020 06:31:02 -0700 (PDT) Received: by mail-lj1-x243.google.com with SMTP id y4so13952026ljn.7; Tue, 21 Apr 2020 06:31:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=n1eN8tSv2qXvNukDnxakUVcpdfWKIz8N5kuJXZzI10Q=; b=GS20hJWbYfCcVAO5njfSRnIIESF6ZVXjfh95iNDyCUQnRwoFrekQHqyaqJNf61Amdm hTD6sx9Y0zhYLokcb+xIMEYUeIjkklCF0wVfLp4SyJR1y60ThyKyU+OWBYzrBB0wqqFK lbKeYdkl6jBOMJjkll1jWQ2djJhB7PCNSq2/KceQEbDNd96HvJJO8cJmbW4HXSsi/Q/u jeIOPzhjjiPv4juZhxYE5G0fpzkCVGBOjX5KJSf0AK1uW2fAoI3qXgr6ZyRmKptzAMmX pGCwaq8VmlBscpaEe34YLYpk1aiWmOWPWQvRDfoiHGzC5noIk6KqMUSaPi5kafhElHea GWUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=n1eN8tSv2qXvNukDnxakUVcpdfWKIz8N5kuJXZzI10Q=; b=kqFT9UcryRd1dCMUhCBGez0qBbQRAKCML/y3GMz8vCwG6z1h+3M2WCFeE5vYyB7hP6 9IiLEi9rUKcx4ZbE3Ih78smOj8O9bnjQimtAMYn1N/wB+2hndTVFahLAftk/dulACPxK ukzu3uxefa2FJFzDZGPppjQrNPJGdUmDvichMk84pdeHZfZQUAgsTlaeew93EB2wD4nJ 9CoLCrH/B7dc83PqfqtIxF/+cCvbs+eNjYOiCL3Uf8zpRMGSlSe3L7FrkS52H4AszgmF IkQzC/zPjIKJHPTlvZUqW/0dXk5WKfw9dgoOikK9h9U56TKCEV9amjfoS8s0iToXRCeW YL+w== X-Gm-Message-State: AGi0PubhpjvrOAiOtDwpFBiCnHuHoEV8QxJn/y9kfEd2v5RO96sefPWq CozH0/nAVEM2/xOCXxgo6bA= X-Received: by 2002:a2e:97d4:: with SMTP id m20mr12754498ljj.159.1587475861272; Tue, 21 Apr 2020 06:31:01 -0700 (PDT) Received: from oak.local ([188.123.231.141]) by smtp.gmail.com with ESMTPSA id v17sm2031456lfi.49.2020.04.21.06.30.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Apr 2020 06:31:00 -0700 (PDT) From: matwey.kornilov@gmail.com To: stern@rowland.harvard.edu, Bin Liu , Greg Kroah-Hartman , linux-usb@vger.kernel.org (open list:MUSB MULTIPOINT HIGH SPEED DUAL-ROLE CONTROLLER), linux-kernel@vger.kernel.org (open list) Cc: "Matwey V. Kornilov" , linux-usb@vger.kernel.org (open list:MUSB MULTIPOINT HIGH SPEED DUAL-ROLE CONTROLLER), linux-kernel@vger.kernel.org (open list) Subject: [PATCH v3 5/6] usb: musb: Introduce musb_start_urb() Date: Tue, 21 Apr 2020 16:30:18 +0300 Message-Id: <20200421133019.27167-6-matwey.kornilov@gmail.com> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200421133019.27167-1-matwey.kornilov@gmail.com> References: <20200421133019.27167-1-matwey.kornilov@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: "Matwey V. Kornilov" 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 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