All of lore.kernel.org
 help / color / mirror / Atom feed
From: wlf <wulf@rock-chips.com>
To: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>,
	William Wu <william.wu@rock-chips.com>,
	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
Subject: Re: [PATCH 2/2] usb: dwc2: fix isoc split in transfer with no data
Date: Tue, 24 Apr 2018 17:04:26 +0800	[thread overview]
Message-ID: <4daa0026-f5b5-a82f-08b1-20196968dcfb@rock-chips.com> (raw)
In-Reply-To: <799e2eea-be83-b3c1-3ee7-7a66b1759379@cogentembedded.com>

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 <william.wu@rock-chips.com>
> [...]
>
> MBR, Sergei
Best regards,
     wulf
>
>
>

WARNING: multiple messages have this Message-ID (diff)
From: William Wu <wulf@rock-chips.com>
To: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>,
	William Wu <william.wu@rock-chips.com>,
	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
Subject: [2/2] usb: dwc2: fix isoc split in transfer with no data
Date: Tue, 24 Apr 2018 17:04:26 +0800	[thread overview]
Message-ID: <4daa0026-f5b5-a82f-08b1-20196968dcfb@rock-chips.com> (raw)

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 <william.wu@rock-chips.com>
> [...]
>
> MBR, Sergei
Best regards,
     wulf
>
>
>
---
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2018-04-24  9:04 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-24  2:43 [PATCH 0/2] usb: dwc2: fix isoc split in transfer issue William Wu
2018-04-24  2:43 ` [PATCH 1/2] usb: dwc2: alloc dma aligned buffer for isoc split in William Wu
2018-04-24  2:43   ` [1/2] " William Wu
2018-04-24  2:43 ` [PATCH 2/2] usb: dwc2: fix isoc split in transfer with no data William Wu
2018-04-24  2:43   ` [2/2] " William Wu
2018-04-24  8:27   ` [PATCH 2/2] " Sergei Shtylyov
2018-04-24  8:27     ` [2/2] " Sergei Shtylyov
2018-04-24  9:04     ` wlf [this message]
2018-04-24  9:04       ` William Wu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4daa0026-f5b5-a82f-08b1-20196968dcfb@rock-chips.com \
    --to=wulf@rock-chips.com \
    --cc=Allen.Hsu@quantatw.com \
    --cc=John.Youn@synopsys.com \
    --cc=StanTsui@AOPEN.com \
    --cc=daniel.meng@rock-chips.com \
    --cc=dianders@google.com \
    --cc=felipe.balbi@linux.intel.com \
    --cc=frank.wang@rock-chips.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=heiko@sntech.de \
    --cc=hminas@synopsys.com \
    --cc=huangtao@rock-chips.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=sergei.shtylyov@cogentembedded.com \
    --cc=william.wu@rock-chips.com \
    --cc=wzz@rock-chips.com \
    --cc=zsq@rock-chips.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.