public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Yunzhi Li <lyz@rock-chips.com>
To: John.Youn@synopsys.com, dianders@chromium.org,
	jwerner@google.com, dinguyen@opensource.altera.com,
	yousaf.kaukab@intel.com, linux-usb@vger.kernel.org,
	linux-kernel@vger.kernel.org, wulf@rock-chips.com,
	kever.yang@rock-chips.com, caesar.wang@rock-chips.com,
	huangtao@rock-chips.com
Cc: rockchip-discuss@chromium.org
Subject: Re: [RFC] usb: dwc2: hcd: fix split schedule issue
Date: Fri, 6 Nov 2015 18:04:56 +0800	[thread overview]
Message-ID: <563C7B48.2020308@rock-chips.com> (raw)
In-Reply-To: <1446802612-5828-1-git-send-email-lyz@rock-chips.com>

hi John ,

   As we talked yesterday, I tried to fix the split schedule sequence. This patch will
avoid scheduling SSPLIT-IN packet for another device between SSPLIT-OUT-begin and
SSPLIT-OUT-end, now the keyboard and Jebra audio speaker could work together well, but
I'm not sure if this is exactly the right way to schedule split transfers and if there
is any dide effect with this patch. Please help review this patch. Thanks.

> Fix dwc2 split schedule sequence issue. Not schedule a SSPLIT_IN
> packet between SSPLIT-begin and SSPLIT-end.
>
> Signed-off-by: Yunzhi Li <lyz@rock-chips.com>
> ---
>   drivers/usb/dwc2/hcd.c | 4 ++++
>   1 file changed, 4 insertions(+)
>
> diff --git a/drivers/usb/dwc2/hcd.c b/drivers/usb/dwc2/hcd.c
> index e79baf7..a32ed01 100644
> --- a/drivers/usb/dwc2/hcd.c
> +++ b/drivers/usb/dwc2/hcd.c
> @@ -1122,6 +1122,10 @@ static void dwc2_process_periodic_channels(struct dwc2_hsotg *hsotg)
>   			break;
>   		}
>   
> +		if (qh->channel->xact_pos == DWC2_HCSPLT_XACTPOS_BEGIN ||
> +		    qh->channel->xact_pos == DWC2_HCSPLT_XACTPOS_MID)
> +			break;
> +
>   		/*
>   		 * In Slave mode, stay on the current transfer until there is
>   		 * nothing more to do or the high-bandwidth request count is

> On 11/5/2015 2:13 AM, lyz@rock-chips.com wrote:
>> Hi John :
>>
>>       We found some problem when we tested usb audio speaker on rk3288 platform
>> which use dwc2 IP v3.10a as usb controller
>>
>> Steps to reproduce the problem:
>> 1. Plug in USB2.0 hub to rk3288 platform board.
>> 2. Plug in USB keyboard to the hub.
>> 3. Plug in USB audio speaker speaker(Jabra 410 or 510) to the hub
>> (These audio speakers support full speed data packet length 192 byte and it will
>> be split into 2 SSPLIT-OUT packets (188B + 4B) in
>> high speed bus other usb audio devices which has FS data packets length smaller
>> then 188B not has this issue )
>> 4. Play music via usb speaker then USB keyboard stop working
>>
>> I do some debug work and try to figure out the root cause of this issue :
>> Use the usb protocol analyzer to catch usb traffic in high speed bus
>> I see something weired that dwc2 send SSPLIT IN for dev 5 between two SSPLIT OUT
>> transaction for dev 6
>> then hub respond a NYET for dev 5 CSPLIT and keyboard not working any more.
>> It seems  some problem with split scheduling sequence and it let the hub
>> confused, but I'm not sure which rule
>> in usb20 spec chapters 11 is broken and how to fix it.
>> DWC2 traffic
>>
>> I alsocatch the usb traffic between an EHCI controller in pc and the hub
>> connected with audio speaker and keyboard
>> both keyboard and audio speaker work well with EHCI. EHCI schedules the SSPLIT
>> IN for keyboard in the next microframe
>> after OUT SSPLIT OUT for audio data packets and the hub can respond NAK .
>>
>>
>> EHCI traffic
>>
>> I will keep on debugging for this issue and try to fix the scheduling sequence ,
>> does anyone have any  ideas could be help with this issue ?
>>
>> --------------------------------------------------------------------------------
>> lyz@rock-chips.com
>>
> Thanks for this report. I'll try to reproduce and forward it
> along to some of our experts.
>
> Regards,
> John
>




  reply	other threads:[~2015-11-06 10:07 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-06  9:36 [RFC] usb: dwc2: hcd: fix split schedule issue Yunzhi Li
2015-11-06 10:04 ` Yunzhi Li [this message]
2015-11-12  0:22   ` Doug Anderson
2015-11-12  4:29     ` John Youn
2015-11-12  4:46       ` Doug Anderson
2015-11-13  5:05         ` John Youn
2015-11-14  0:33           ` Doug Anderson
2015-11-14 17:32             ` Alan Stern
2015-11-16 20:46             ` Julius Werner
2015-11-12  9:42       ` Yunzhi Li
2015-11-17  3:56       ` Doug Anderson
2015-11-06 23:56 ` Doug Anderson
2015-11-09  9:57   ` Yunzhi Li
2015-11-09 14:37     ` Doug Anderson

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=563C7B48.2020308@rock-chips.com \
    --to=lyz@rock-chips.com \
    --cc=John.Youn@synopsys.com \
    --cc=caesar.wang@rock-chips.com \
    --cc=dianders@chromium.org \
    --cc=dinguyen@opensource.altera.com \
    --cc=huangtao@rock-chips.com \
    --cc=jwerner@google.com \
    --cc=kever.yang@rock-chips.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=rockchip-discuss@chromium.org \
    --cc=wulf@rock-chips.com \
    --cc=yousaf.kaukab@intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox