lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <563C7B48.2020308@rock-chips.com>
Date:	Fri, 6 Nov 2015 18:04:56 +0800
From:	Yunzhi Li <lyz@...k-chips.com>
To:	John.Youn@...opsys.com, dianders@...omium.org, jwerner@...gle.com,
	dinguyen@...nsource.altera.com, yousaf.kaukab@...el.com,
	linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org,
	wulf@...k-chips.com, kever.yang@...k-chips.com,
	caesar.wang@...k-chips.com, huangtao@...k-chips.com
Cc:	rockchip-discuss@...omium.org
Subject: Re: [RFC] usb: dwc2: hcd: fix split schedule issue

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@...k-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@...k-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@...k-chips.com
>>
> Thanks for this report. I'll try to reproduce and forward it
> along to some of our experts.
>
> Regards,
> John
>



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ