Received: by 10.192.165.148 with SMTP id m20csp4421712imm; Tue, 24 Apr 2018 02:24:43 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+IrQjn1czA0Arh8ZUy4dMQ0EtVSYeuk1D0plqZkNYkNc+lQBVQuvhmvk+2zDuL86w+Iwo7 X-Received: by 2002:a17:902:6909:: with SMTP id j9-v6mr24222835plk.313.1524561883522; Tue, 24 Apr 2018 02:24:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524561883; cv=none; d=google.com; s=arc-20160816; b=Yy6w+zlzDmGX3p2QRLnbXh/Ov4im9TIxY7ZhwGoG1ZkkzgXEDK2HHEsZDyFpgBWqxo eJG8gkpUuFR32i0jzzeHPX+m7iEnkdXGFgf9vqTUR3yZoLe23uPwijzgEjdmGGorhNwc aa+EuXl+9ybuNENLuw4nMqqO0sGyvfgY5TPcmS6BhTKl2SWCmqjCqFppJqOknFVNrBoz srrdoa7dqRRYLzVBDV/oJnyYYih67X7tAd6k9+wPQPLS35hj1OW64pXktKJ6kSsxoml4 vLhsoRQkQxTqSYobK6ElpSCeHobNkD4So8p4nTBEzbIn8ySKMaHqoEMRmP4sDq3lL/wZ ovPw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:arc-authentication-results; bh=WOrRXWZ676CiX40zInt3Uz79Gq1C51QoK84mAD9+D4U=; b=O8JsAL4WNbopmrKvrowmxcno194uuZ5Hpkm1+yhizuFu8QvGaAIleu+zQWpdY9ERiD e+0WsQV+pS5runtu1NpXDcYa3O1VheWzP7lOAhWLXxHozPqgF8sf2KGN43o7qQWBcVPE RiV4AxYQMwHaO72/WD8DJMAC7U7g5Zoqy33zSXY0uQrDYLMJ7+LHm+WeXXIQlP7FTS06 3q3B5pRZKY9QaVHWB179OE8LT9VQebnMLY7k9FcbOPteiRQyS2TehVlyjB+J2vdUmIZF neXOCmPd73FRQ5u8I23lk7JJOvX73dIWM0mTex1C4RkFHnXwcYhWDSX1Xx/udsM0emeX OA0g== 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 j8si10734797pgp.506.2018.04.24.02.24.28; Tue, 24 Apr 2018 02:24:43 -0700 (PDT) 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 S1753347AbeDXJEu (ORCPT + 99 others); Tue, 24 Apr 2018 05:04:50 -0400 Received: from regular1.263xmail.com ([211.150.99.137]:50547 "EHLO regular1.263xmail.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753273AbeDXJEs (ORCPT ); Tue, 24 Apr 2018 05:04:48 -0400 Received: from wulf?rock-chips.com (unknown [192.168.167.225]) by regular1.263xmail.com (Postfix) with ESMTP id 02798DC34; Tue, 24 Apr 2018 17:04:40 +0800 (CST) X-263anti-spam: KSV:0; X-MAIL-GRAY: 0 X-MAIL-DELIVERY: 1 X-KSVirus-check: 0 X-ABS-CHECKED: 4 Received: from [172.16.12.229] (localhost [127.0.0.1]) by smtp.263.net (Postfix) with ESMTPA id BEE3C3E7; Tue, 24 Apr 2018 17:04:27 +0800 (CST) X-IP-DOMAINF: 1 X-RL-SENDER: wulf@rock-chips.com X-FST-TO: stantsui@aopen.com X-SENDER-IP: 58.22.7.114 X-LOGIN-NAME: wulf@rock-chips.com X-UNIQUE-TAG: X-ATTACHMENT-NUM: 0 X-SENDER: wulf@rock-chips.com X-DNS-TYPE: 0 Received: from [172.16.12.229] (unknown [58.22.7.114]) by smtp.263.net (Postfix) whith ESMTP id 13598QBMM2T; Tue, 24 Apr 2018 17:04:36 +0800 (CST) Subject: Re: [PATCH 2/2] usb: dwc2: fix isoc split in transfer with no data To: Sergei Shtylyov , William Wu , hminas@synopsys.com, felipe.balbi@linux.intel.com, gregkh@linuxfoundation.org Cc: heiko@sntech.de, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, linux-rockchip@lists.infradead.org, frank.wang@rock-chips.com, huangtao@rock-chips.com, dianders@google.com, daniel.meng@rock-chips.com, John.Youn@synopsys.com, wzz@rock-chips.com, zsq@rock-chips.com, Allen.Hsu@quantatw.com, StanTsui@AOPEN.com References: <1524537824-22010-1-git-send-email-william.wu@rock-chips.com> <1524537824-22010-3-git-send-email-william.wu@rock-chips.com> <799e2eea-be83-b3c1-3ee7-7a66b1759379@cogentembedded.com> From: wlf Message-ID: <4daa0026-f5b5-a82f-08b1-20196968dcfb@rock-chips.com> Date: Tue, 24 Apr 2018 17:04:26 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <799e2eea-be83-b3c1-3ee7-7a66b1759379@cogentembedded.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Dear Sergei, 在 2018年04月24日 16:27, Sergei Shtylyov 写道: > Hello! > > On 4/24/2018 5:43 AM, William Wu wrote: > >> If isoc split in transfer with no data (the length of DATA0 >> packet is 0), we can't simply return immediately. Because the >> DATA0 can be the first transaction or the second transaction for >> the isoc split in transaction. If the DATA0 packet with on data >                                                           ^^ no? Thank you for correcting me. I will fix it in next patch version. > >> is in the first transaction, we can return immediately. But if >> the the DATA0 packet with on data is in the second transaction > >   One "the" too many. And that "on data" again... :-) Ah, sorry to make such a simple mistake. I will fix these in next patch version. > >> of isoc split in transaction sequence, we need to increase the >> qtd->isoc_frame_index and giveback urb to device driver if needed, >> otherwise, the MDATA packet will be lost. >> >> A typical test case is that connect the dwc2 controller with an >> usb hs Hub (GL852G-12), and plug an usb fs audio device (Plantronics >> headset) into the downstream port of Hub. Then use the usb mic >> to record, we can find noise when playback. >> >> In the case, the isoc split in transaction sequence like this: >> >> - SSPLIT IN transaction >> - CSPLIT IN transaction >>    - MDATA packet (176 bytes) >> - CSPLIT IN transaction >>    - DATA0 packet (0 byte) >> >> This patch use both the length of DATA0 and qtd->isoc_split_offset >> to check if the DATA0 is in the second transaction. >> >> Signed-off-by: William Wu > [...] > > MBR, Sergei Best regards,     wulf > > >