From patchwork Mon Sep 28 20:19:43 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Balbi X-Patchwork-Id: 54210 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f70.google.com (mail-la0-f70.google.com [209.85.215.70]) by patches.linaro.org (Postfix) with ESMTPS id 8654022B1E for ; Mon, 28 Sep 2015 20:19:57 +0000 (UTC) Received: by labnm6 with SMTP id nm6sf4493950lab.1 for ; Mon, 28 Sep 2015 13:19:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-type:sender:precedence :list-id:x-original-sender:x-original-authentication-results :mailing-list:list-post:list-help:list-archive:list-unsubscribe; bh=NqkcXA/0mVJlW3q+30Z7Im0nyjSwdwXHcuTfYR0xShE=; b=a2GEk5IoPr0/deAd3RLF4cpjmpncez5rJ77OlAHWWEk2rnsaT9uBzVv5OxxtxvT281 L0tQrLNSFcrM1d1GEHIsWagMnAA8MD/sepw1bBPFs9LmJwVnPc4JyOvjust5T9ERQb+u gEJy/Tgm8fgka6uDied5U3OH6eHVLgUd0+F177G41TOhRDcCrqwObBRpKwKUIAN4KU1E E/j5BjJBPNEVjhMoc3I/ugbPvUjWFAho5ItvPKpL31s5O5+dBKZO1ksvc5Mfvr1w7yNM Eoy6hzEdfHM9ZPLrtwV54Oap0Hf3sVSusN1hpVVRUSnNoWHWuhUQrGYpYpz/xM974aF8 TQSQ== X-Gm-Message-State: ALoCoQmYpGqS57YvQzLmgDvJxL6Q38PEEvpePAOENkbObqU/78Tz1DL1U6DpXp2EYo0SZ4+ZGOc0 X-Received: by 10.180.208.7 with SMTP id ma7mr1183038wic.5.1443471596156; Mon, 28 Sep 2015 13:19:56 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.25.164.135 with SMTP id n129ls365454lfe.7.gmail; Mon, 28 Sep 2015 13:19:56 -0700 (PDT) X-Received: by 10.112.168.194 with SMTP id zy2mr6248763lbb.79.1443471596008; Mon, 28 Sep 2015 13:19:56 -0700 (PDT) Received: from mail-la0-f52.google.com (mail-la0-f52.google.com. [209.85.215.52]) by mx.google.com with ESMTPS id ir2si9127879lac.75.2015.09.28.13.19.55 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 28 Sep 2015 13:19:55 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.52 as permitted sender) client-ip=209.85.215.52; Received: by lahh2 with SMTP id h2so173662053lah.0 for ; Mon, 28 Sep 2015 13:19:55 -0700 (PDT) X-Received: by 10.112.146.104 with SMTP id tb8mr6222735lbb.35.1443471595734; Mon, 28 Sep 2015 13:19:55 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.59.35 with SMTP id w3csp1751329lbq; Mon, 28 Sep 2015 13:19:54 -0700 (PDT) X-Received: by 10.107.137.162 with SMTP id t34mr25868571ioi.103.1443471594732; Mon, 28 Sep 2015 13:19:54 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e62si13949338iod.102.2015.09.28.13.19.54; Mon, 28 Sep 2015 13:19:54 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-usb-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753345AbbI1UTw (ORCPT + 4 others); Mon, 28 Sep 2015 16:19:52 -0400 Received: from devils.ext.ti.com ([198.47.26.153]:50395 "EHLO devils.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751956AbbI1UTv (ORCPT ); Mon, 28 Sep 2015 16:19:51 -0400 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id t8SKJpBC016406 for ; Mon, 28 Sep 2015 15:19:51 -0500 Received: from DFLE73.ent.ti.com (dfle73.ent.ti.com [128.247.5.110]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id t8SKJpP8005437 for ; Mon, 28 Sep 2015 15:19:51 -0500 Received: from dflp32.itg.ti.com (10.64.6.15) by DFLE73.ent.ti.com (128.247.5.110) with Microsoft SMTP Server id 14.3.224.2; Mon, 28 Sep 2015 15:19:51 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp32.itg.ti.com (8.14.3/8.13.8) with ESMTP id t8SKJoWC015243; Mon, 28 Sep 2015 15:19:50 -0500 From: Felipe Balbi To: Linux USB Mailing List CC: Felipe Balbi Subject: [PATCH 2/3] usb: dwc3: gadget: use Update Transfer from Xfer In Progress Date: Mon, 28 Sep 2015 15:19:43 -0500 Message-ID: <1443471584-21683-2-git-send-email-balbi@ti.com> X-Mailer: git-send-email 2.5.0.GIT In-Reply-To: <1443471584-21683-1-git-send-email-balbi@ti.com> References: <1443471584-21683-1-git-send-email-balbi@ti.com> MIME-Version: 1.0 Sender: linux-usb-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-usb@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: balbi@ti.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.52 as permitted sender) smtp.mailfrom=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Instead of limiting __dwc3_gadget_kick_transfer() to Xfer Complete, we can try to issue Update Transfer command from Xfer In Progress too. Signed-off-by: Felipe Balbi --- drivers/usb/dwc3/gadget.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index ee3d05fa674d..81bfb9ad1e2e 100644 --- a/drivers/usb/dwc3/gadget.c +++ b/drivers/usb/dwc3/gadget.c @@ -1968,10 +1968,10 @@ static void dwc3_endpoint_transfer_complete(struct dwc3 *dwc, dwc->u1u2 = 0; } - if (is_xfer_complete && !usb_endpoint_xfer_isoc(dep->endpoint.desc)) { + if (!usb_endpoint_xfer_isoc(dep->endpoint.desc)) { int ret; - ret = __dwc3_gadget_kick_transfer(dep, 0, 1); + ret = __dwc3_gadget_kick_transfer(dep, 0, is_xfer_complete); if (!ret || ret == -EBUSY) return; }