Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp6326393ybx; Mon, 11 Nov 2019 07:28:32 -0800 (PST) X-Google-Smtp-Source: APXvYqxPJ2dEyXq9zPGqz8EcPkEolEKdSKFh9zYxTO7c8NKh3+yTwdS8/TCNRigelqUgA+srEkAc X-Received: by 2002:aa7:c842:: with SMTP id g2mr27065540edt.132.1573486112248; Mon, 11 Nov 2019 07:28:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573486112; cv=none; d=google.com; s=arc-20160816; b=cNKQmgnI2MGkO6D9C5uQfm/Clk3mDQy7E0In/b0zn1JROEWvzvm+//tfHVDtZOe+WG hFXsZmSNHTY3fgrLNAyCemy1fX4PYasWIa5JNmppjWCnkwu3uj7lDfAdJYBdyvURyzM0 PpZfZN/Sdq3Pb4FBGOpugA/UqCx0cDdGua5nycz2KCz90GG29CFK1D+kPgpQmG2feXCt OKLdqELzhO0+WPZcw/mLBIL2Nx3HCW9tM/L8Tw2pBTg19LFSlhDLqCVLUYCE5wzAAnrI CFfwZ6MBWHzpYGavpW8S+Q9yUHdVZRZmgSk+E8LeBbwCTDwzOQUdjTOKsPri0cMvIgfF Rxxw== 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 :message-id:date:subject:cc:to:from; bh=4/HG+HS6X4QGrQW7ZHs//0jUjPPTnUq/PjxfqDMAzmI=; b=sh23VzxcILtx/1jNH5rQgpxpVqnDdvjibFUY8IU1NGGoTXjuBdFBHS8c07+Mj2IEvq 75SES3W3he2Cbv6XrCjVSVDuHHWG70rpXT/Bjj/5oDnpW+w3GvByrPLAchHp/L5XZBHR PYZaOy0y3MEnaFonkKAVgf+ZtVCAKb1i0qdCQlvOwKucMghMDVK41Lw2U633byeTyTC+ M+Pr9fPczuHHS8v52xN1hR1n2FiwtrigLPGb7cOVyc0tNQsEkJ0FToI8l4Lhs5w9fGUY bOvBPE5138ca2MR6lzhz8oWx5H9SmWS2bwvvZT2NUvVoTD5WIkW8DEMa1+etsSgdvjDX glPw== 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 x11si10119053edq.31.2019.11.11.07.28.07; Mon, 11 Nov 2019 07:28:32 -0800 (PST) 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 S1727002AbfKKP1A (ORCPT + 99 others); Mon, 11 Nov 2019 10:27:00 -0500 Received: from metis.ext.pengutronix.de ([85.220.165.71]:38501 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726902AbfKKP04 (ORCPT ); Mon, 11 Nov 2019 10:26:56 -0500 Received: from dude02.hi.pengutronix.de ([2001:67c:670:100:1d::28] helo=dude02.lab.pengutronix.de) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1iUBac-0000hy-13; Mon, 11 Nov 2019 16:26:50 +0100 Received: from mol by dude02.lab.pengutronix.de with local (Exim 4.92) (envelope-from ) id 1iUBaa-0003bN-Qm; Mon, 11 Nov 2019 16:26:48 +0100 From: Michael Olbrich To: linux-usb@vger.kernel.org Cc: Felipe Balbi , Thinh Nguyen , Greg Kroah-Hartman , linux-kernel@vger.kernel.org, kernel@pengutronix.de, Michael Olbrich Subject: [PATCH 0/2] usb: dwc3: gadget: improve isoc handling Date: Mon, 11 Nov 2019 16:26:43 +0100 Message-Id: <20191111152645.13792-1-m.olbrich@pengutronix.de> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::28 X-SA-Exim-Mail-From: mol@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org These two patches improve the isoc handling and make the dwc3 gadget driver somewhat usable with the UVC gadget for isochronous endpoints. The first patch makes starting isochronous transfers more reliable. I think it's more less, what Thinh suggested some time ago[1]. It's still not perfect because the first request must still be queued within 2 seconds but it's a lot better than the current situation. The second patch makes it possible to have gaps in the data stream. The UVC gadget relies on such behaviour. Without this, using the UVC gadget with a live stream stops after the first frame, because all later frames are dropped. I'm not sure if this is the correct solution, but all other drivers currently work this way, from what I can tell. Regards, Michael [1] https://marc.info/?l=linux-usb&m=156088170723824&w=4 Michael Olbrich (2): usb: dwc3: gadget: make starting isoc transfers more robust usb: dwc3: gadget: restart the transfer if a isoc request is queued too late drivers/usb/dwc3/core.h | 1 + drivers/usb/dwc3/gadget.c | 39 +++++++++++++++++++++++++++++++-------- 2 files changed, 32 insertions(+), 8 deletions(-) -- 2.20.1