Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3935000imu; Tue, 18 Dec 2018 06:36:25 -0800 (PST) X-Google-Smtp-Source: AFSGD/ViMzYb8qSvA20QIxvEucuGQvGOrrCkirzfcaKEDKFvUvCiHgko9clCKUGkPaDyklg/jsxt X-Received: by 2002:a62:1e87:: with SMTP id e129mr16706615pfe.221.1545143785459; Tue, 18 Dec 2018 06:36:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545143785; cv=none; d=google.com; s=arc-20160816; b=biT+icwBrX2hgyel2iw4DwIEpPd+4Gjtl9wW1km9BC+VJ5BNdPzup017k6HBJZ9mVU rj4tnKJxlzAapLHcr9Adkod0iMr+VyMMaQ83/WIC8encRFf5WOTiJo8lJP1L4cEoS2RI /BdjOfwdj4F4NERz+ftBjBxLwhYDcCyyEVD5DL1jSkiW9BwzyR7QtG1HqGj+3UKfmxos ld5NM+o2w5vGPJQ3j/AnaEAD0PjbY93uq42jwB0jLo8BdQm1gSI/ZXTxFdbt5RtyABCJ YQF9Kjefcbfvgg2+1qIPTnoylZIXxRkNtwdX2VfbpotIBh1ScpNTswrw33G8Dbjl1D6U Zyzg== 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:subject:cc:to:from:date :dkim-signature; bh=4SKEheRT7S+fmcuVCmomyJzxoSEcP+Va5P2zCsy5xxw=; b=lpcE+qaDkcyRMWsVW1fFfGI+dh2/G1INSAAmJi1b8PllaMB5WULLfF6DYLJTDaxaq8 zfpJyUybcm2WY7551V6sgw6KA5BorFS/9ITRNSrvlQJxi//dR11FyAv/qRUQD9b/YEDY 8wnssMjD5/LF5kOdg3rq8aOTIY3OnZnOWM3tvXBp0EwFEMrsFcsebXjmvVd5wZ+fAAUZ pcdl3KwxqH5As4H5Zvozhuu625KDezoqBgXXhJaG22GzxdSjhSzsEL2m6Q4vamaFv0HS FWvT6u3znHAUlAhy41Eb1Wcqay/e6J+y7G4wayJGC1sRUBiTqp7+fyJzYQRHQVuQQlQM orTQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@metanate.com header.s=stronger header.b=ZjEjSMOv; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=metanate.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 3si13877001plo.102.2018.12.18.06.36.09; Tue, 18 Dec 2018 06:36:25 -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; dkim=fail (test mode) header.i=@metanate.com header.s=stronger header.b=ZjEjSMOv; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=metanate.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726816AbeLROfN (ORCPT + 99 others); Tue, 18 Dec 2018 09:35:13 -0500 Received: from dougal.metanate.com ([90.155.101.14]:5278 "EHLO metanate.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726469AbeLROfL (ORCPT ); Tue, 18 Dec 2018 09:35:11 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=simple/simple; d=metanate.com; s=stronger; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References :In-Reply-To:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=fDf8w06EvPPnJnz2mbgwzBBRvCSx7x9J3JyHflpLMEc=; b=ZjEjSMOvTWfykSCFmvLaxbjR3+ zXJGXIO/KXHtTqk5RKFHvgSHJtZGL9qX+ZL1tR9kjTI760XeGMBksNHQI3PXL/5V04p5kAMPC4pYO byX2eMiGEx+D2zAMxRJi3HXnv82u738eKtQq8L16zGARwY//MAiiqNhmkbjeEn/ZI6/4+mcxe3J/X CmqdebmuJNYg/0LfbpWUaPv5+tNO8CEkSBqxiJf35ys0SAoKDtOUuHe//YUsNkru9iZMRIgGyXup5 obRZj0DYnApZNQ9vv99LOFx/7t5Z+QX72WF6hzPa/0eXZL1qY+aGzkWuUszg0w/hXCsGDrcumtSFg 0Mm5fayg==; Received: from johnkeeping.plus.com ([81.174.171.191] helo=donbot) by shrek.metanate.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1gZGSg-0002Q1-Ol; Tue, 18 Dec 2018 14:35:06 +0000 Date: Tue, 18 Dec 2018 14:35:04 +0000 From: John Keeping To: Minas Harutyunyan Cc: Greg Kroah-Hartman , "linux-usb@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "arthur.petrosyan@synopsys.com" Subject: Re: [PATCH] usb: dwc2: gadget: fix ISOC frame overflow handling Message-ID: <20181218143504.027fc53c@donbot> In-Reply-To: <410670D7E743164D87FA6160E7907A56013A7BAB28@am04wembxa.internal.synopsys.com> References: <20181023134355.29829-1-john@metanate.com> <410670D7E743164D87FA6160E7907A56013A79E7CE@am04wembxa.internal.synopsys.com> <20181108173654.118f9e3e@donbot> <410670D7E743164D87FA6160E7907A56013A7A0F2B@am04wembxa.internal.synopsys.com> <410670D7E743164D87FA6160E7907A56013A7A12C1@am04wembxa.internal.synopsys.com> <20181109184246.33cb4487@donbot> <410670D7E743164D87FA6160E7907A56013A7A27D7@am04wembxa.internal.synopsys.com> <20181112224626.6b44568a@donbot> <410670D7E743164D87FA6160E7907A56013A7BAB28@am04wembxa.internal.synopsys.com> X-Mailer: Claws Mail 3.17.1 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Authenticated: YES Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Minas, On Fri, 14 Dec 2018 09:00:08 +0000 Minas Harutyunyan wrote: > First of all, sorry for delayed answer. > Looks like similar issue seen by Andrzej Pietrasiewicz > : "dwc2 isochronous transfers issues". Same > feedback provided to Andrzej. > > I run tests on 4.20.0-rc4 in DDMA. By default IN ISOC traffic failed > because of BNA interrupts. It's happen because UAC2 requests count > set by default to 2. Our core and driver can't work in DDMA with > descriptor list length equal to 2. It's not possible on time prepare > next descriptors to avoid BNA interrupt. > > By changing UAC2_DEF_REQ_NUM to 4 all audio gadget tests passed > smoothly. Could you please apply this patch and run tests in DDMA > mode: > > diff --git a/drivers/usb/gadget/function/u_uac2.h > b/drivers/usb/gadget/function/u_uac2.h > index 8362ee572e1e..5e649259ab76 100644 > --- a/drivers/usb/gadget/function/u_uac2.h > +++ b/drivers/usb/gadget/function/u_uac2.h > @@ -21,7 +21,7 @@ > #define UAC2_DEF_CCHMASK 0x3 > #define UAC2_DEF_CSRATE 64000 > #define UAC2_DEF_CSSIZE 2 > -#define UAC2_DEF_REQ_NUM 2 > +#define UAC2_DEF_REQ_NUM 4 > > struct f_uac2_opts { > struct usb_function_instance func_inst; > > > If it will OK on your side also then will switch to BDMA mode and > debug. With DDMA enabled, I see the following error after the stream has been running for a while (anything from a few seconds to a few minutes): -- >8 -- [ 1798.836322] dwc2 ff580000.usb: dwc2_hsotg_ep_disable: called for ep0 [ 1798.836329] dwc2 ff580000.usb: dwc2_hsotg_ep_disable: called for ep0 [ 1798.851092] dwc2 ff580000.usb: new device is high-speed [ 1798.924461] dwc2 ff580000.usb: new device is high-speed [ 1798.982887] dwc2 ff580000.usb: new address 25 [ 1799.002463] configfs-gadget gadget: high-speed config #1: config -- 8< -- On the host side (Linux 4.18.16 Intel xHCI), I see this logged at the same time: -- >8 -- [1735740.716242] retire_capture_urb: usb 1-2.2.7: frame 0 active: -71 [1735740.716990] retire_capture_urb: usb 1-2.2.7: frame 0 active: -71 [1735740.717906] retire_capture_urb: usb 1-2.2.7: frame 0 active: -71 [1735740.718905] retire_capture_urb: usb 1-2.2.7: frame 0 active: -71 [1735740.719916] retire_capture_urb: usb 1-2.2.7: frame 0 active: -71 [1735740.720032] usb 1-2.2-port7: disabled by hub (EMI?), re-enabling... [1735740.720036] usb 1-2.2.7: USB disconnect, device number 28 [1735740.937500] usb 1-2.2.7: new high-speed USB device number 29 using xhci_hcd -- 8< -- The device does then enumerate and works for a period of time before the same error happens again. Regards, John