From patchwork Thu Nov 8 02:24:26 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thinh Nguyen X-Patchwork-Id: 10673387 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8E99215E9 for ; Thu, 8 Nov 2018 02:24:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7E2ED2D6FB for ; Thu, 8 Nov 2018 02:24:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6F41F2D6FD; Thu, 8 Nov 2018 02:24:29 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1988C2D6FB for ; Thu, 8 Nov 2018 02:24:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728581AbeKHL5i (ORCPT ); Thu, 8 Nov 2018 06:57:38 -0500 Received: from smtprelay.synopsys.com ([198.182.60.111]:60560 "EHLO smtprelay.synopsys.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726684AbeKHL5i (ORCPT ); Thu, 8 Nov 2018 06:57:38 -0500 Received: from mailhost.synopsys.com (mailhost1.synopsys.com [10.12.238.239]) by smtprelay.synopsys.com (Postfix) with ESMTP id 431D410C06E4; Wed, 7 Nov 2018 18:24:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=synopsys.com; s=mail; t=1541643868; bh=2gN3OlChqwosh53vh6rtYeoyUSVw2vAQdQE73sodKW0=; h=Date:In-Reply-To:References:From:Subject:To:CC:From; b=OYFDLHCE9EXU0qSdOv/Lv4anxaVuinQueS8GEhZuIVnNBdR6VWByF/SVWCX5U9fkR AWOBMq5uim7BNer4rDliNlpnvX4To5xgq+HJGmGKz74HlvyPG8n01Edq4KCo8Vptto XvvhSGXN8ZfiSMHpv2KBgURlNf2JzVhBJfTs4ZxJmQirdT1POmyG1MmFQbwokKsVy6 wxJnqlT5JTQOM9uaKcNk6ngJhSqbuCwTT659638GG/Z3ZEOcsPvOxp06B+udJORxIl Mpdobnru+5dtRp/trKm6HZHZQlmxPeVX0B92NjbClUnIgj6kkMIUrTuaNaHenibXDj ypqaN3U5Iwx2A== Received: from US01WEHTC3.internal.synopsys.com (us01wehtc3.internal.synopsys.com [10.15.84.232]) by mailhost.synopsys.com (Postfix) with ESMTP id 3221454F0; Wed, 7 Nov 2018 18:24:28 -0800 (PST) Received: from US01WEHTC1.internal.synopsys.com (10.12.239.236) by US01WEHTC3.internal.synopsys.com (10.15.84.232) with Microsoft SMTP Server (TLS) id 14.3.408.0; Wed, 7 Nov 2018 18:24:28 -0800 Received: from te-lab16 (10.13.184.20) by us01wehtc1.internal.synopsys.com (10.12.239.236) with Microsoft SMTP Server (TLS) id 14.3.408.0; Wed, 7 Nov 2018 18:24:26 -0800 Received: by te-lab16 (sSMTP sendmail emulation); Wed, 07 Nov 2018 18:24:26 -0800 Date: Wed, 7 Nov 2018 18:24:26 -0800 Message-ID: <9b885d62d87b297abd9832723d230d9d7f206eff.1541643786.git.thinhn@synopsys.com> In-Reply-To: <58c23ee62fabb5753ce9ea7fc1e93743a5b7781c.1541643786.git.thinhn@synopsys.com> References: <58c23ee62fabb5753ce9ea7fc1e93743a5b7781c.1541643786.git.thinhn@synopsys.com> From: Thinh Nguyen Subject: [PATCH 2/2] usb: dwc3: gadget: Report isoc scheduled frame number To: Felipe Balbi , Greg Kroah-Hartman , CC: John Youn , Thinh Nguyen MIME-Version: 1.0 X-Originating-IP: [10.13.184.20] Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Report the scheduled frame number of an isochronous request. Signed-off-by: Thinh Nguyen --- drivers/usb/dwc3/gadget.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index 679c12e14522..34540b661592 100644 --- a/drivers/usb/dwc3/gadget.c +++ b/drivers/usb/dwc3/gadget.c @@ -2254,6 +2254,10 @@ static int dwc3_gadget_ep_reclaim_completed_trb(struct dwc3_ep *dep, if (chain && (trb->ctrl & DWC3_TRB_CTRL_HWO)) trb->ctrl &= ~DWC3_TRB_CTRL_HWO; + /* Report scheduled frame number for isoc transfers */ + if (usb_endpoint_xfer_isoc(dep->endpoint.desc)) + req->request.start_frame = dep->frame_number; + /* * If we're dealing with unaligned size OUT transfer, we will be left * with one TRB pending in the ring. We need to manually clear HWO bit