* CONFIG_PREEMPT_RT_FULL an usb gadget
@ 2013-08-27 14:54 Hänel-Baas, Alexander
2013-08-29 11:35 ` Sebastian Andrzej Siewior
0 siblings, 1 reply; 9+ messages in thread
From: Hänel-Baas, Alexander @ 2013-08-27 14:54 UTC (permalink / raw)
To: linux-rt-users@vger.kernel.org
Hello rt-community,
i use the kernel 3.10.4 with the 3.10.4-rt-1 patch
and the usb RNDIS connection to a windows pc.
In the kernelconfig i set the low-latency desktop with CONFIG_PREEMPT_LL=y and the usb Ethernet gadget works fine.
Now i change the kernelconfig to CONFIG_PREEMPT_RT_FULL=Y and now it is not possible to get a working usb gadget connection.
In both situation i see that windows detect the RNDIS device in the device manager.
The next step was to enable the USB gadget debugging messages to see what is going on.
At this time I see many usb-gadget outputs:
#dmesg
[ 84.085953] gen_ndis_query_resp: RNDIS_OID_GEN_RCV_NO_BUFFER
[ 84.093266] g_ether gadget: rndis reqa1.01 v0000 i0000 l4096
[ 84.093621] g_ether gadget: rndis req21.00 v0000 i0000 l36
[ 84.101284] g_ether gadget: rndis reqa1.01 v0000 i0000 l4096
[ 84.101680] g_ether gadget: rndis req21.00 v0000 i0000 l36
[ 84.109265] g_ether gadget: rndis reqa1.01 v0000 i0000 l4096
[ 84.109663] g_ether gadget: rndis req21.00 v0000 i0000 l36
[ 84.109782] gen_ndis_query_resp: RNDIS_OID_GEN_RCV_NO_BUFFER
...
But I can't find a difference between the working config (low-latency)
and the full-rt configuration.
What can I do to get a working fully pre-emptible usb gadget?
kind regards
Alexander Haenel-Baas
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: CONFIG_PREEMPT_RT_FULL an usb gadget
2013-08-27 14:54 CONFIG_PREEMPT_RT_FULL an usb gadget Hänel-Baas, Alexander
@ 2013-08-29 11:35 ` Sebastian Andrzej Siewior
[not found] ` <9BA84827B30CBE4996725F98F7DC91232F955F47@SMExchange01.siebmeyer.org>
0 siblings, 1 reply; 9+ messages in thread
From: Sebastian Andrzej Siewior @ 2013-08-29 11:35 UTC (permalink / raw)
To: Hänel-Baas, Alexander; +Cc: linux-rt-users@vger.kernel.org
* Hänel-Baas, Alexander | 2013-08-27 14:54:35 [+0000]:
>Hello rt-community,
Hi,
>i use the kernel 3.10.4 with the 3.10.4-rt-1 patch
>and the usb RNDIS connection to a windows pc.
So you use an x86 based UDC/machine if you are using v3.10.4-rt1 here.
>In the kernelconfig i set the low-latency desktop with CONFIG_PREEMPT_LL=y and the usb Ethernet gadget works fine.
>
>Now i change the kernelconfig to CONFIG_PREEMPT_RT_FULL=Y and now it is not possible to get a working usb gadget connection.
Is a different gadget working? Say usb-storage against Windows oder
g_ncm against Linux?
>In both situation i see that windows detect the RNDIS device in the device manager.
>
>The next step was to enable the USB gadget debugging messages to see what is going on.
>At this time I see many usb-gadget outputs:
>
>#dmesg
>[ 84.085953] gen_ndis_query_resp: RNDIS_OID_GEN_RCV_NO_BUFFER
>[ 84.093266] g_ether gadget: rndis reqa1.01 v0000 i0000 l4096
>[ 84.093621] g_ether gadget: rndis req21.00 v0000 i0000 l36
>[ 84.101284] g_ether gadget: rndis reqa1.01 v0000 i0000 l4096
>[ 84.101680] g_ether gadget: rndis req21.00 v0000 i0000 l36
>[ 84.109265] g_ether gadget: rndis reqa1.01 v0000 i0000 l4096
>[ 84.109663] g_ether gadget: rndis req21.00 v0000 i0000 l36
>[ 84.109782] gen_ndis_query_resp: RNDIS_OID_GEN_RCV_NO_BUFFER
>...
>
>But I can't find a difference between the working config (low-latency)
>and the full-rt configuration.
>
>What can I do to get a working fully pre-emptible usb gadget?
Try to enable lock debuging and see if the kernel complains about
something.
So after enabling debug you don't see a difference in the communication?
Can you try against Linux RNDIS and see if that is working? If that also
fails then you get a chance to debug.
>
>kind regards
>Alexander Haenel-Baas
Sebastian
--
To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: CONFIG_PREEMPT_RT_FULL an usb gadget
@ 2013-10-14 14:26 Hänel-Baas, Alexander
2013-10-18 14:35 ` Sebastian Andrzej Siewior
0 siblings, 1 reply; 9+ messages in thread
From: Hänel-Baas, Alexander @ 2013-10-14 14:26 UTC (permalink / raw)
To: Sebastian Andrzej Siewior (bigeasy@linutronix.de)
Cc: linux-rt-users@vger.kernel.org
Hello Sebastian,
nice to hear from you.
Yes I have disable ehci & ohci with no changes.
But the following dmesg shows the problem:
[ 335.682365] gen_ndis_query_resp: RNDIS_OID_GEN_RCV_NO_BUFFER -> normal read
[ 335.693595] g_ether gadget: rndis reqa1.01 v0000 i0000 l4096
[ 335.700148] g_ether gadget: rndis req21.00 v0000 i0000 l36
[ 335.713727] g_ether gadget: rndis reqa1.01 v0000 i0000 l4096
[ 335.720236] g_ether gadget: rndis req21.00 v0000 i0000 l36
[ 335.733730] g_ether gadget: rndis reqa1.01 v0000 i0000 l4096
[ 335.740482] g_ether gadget: rndis req21.00 v0000 i0000 l36
[ 335.746520] gen_ndis_query_resp: RNDIS_OID_GEN_RCV_NO_BUFFER -> normal read
[ 335.757582] g_ether gadget: rndis reqa1.01 v0000 i0000 l4096
[ 335.764220] g_ether gadget: rndis req21.00 v0000 i0000 l36
[ 335.777721] g_ether gadget: rndis reqa1.01 v0000 i0000 l4096
[ 335.784467] g_ether gadget: rndis req21.00 v0000 i0000 l36
[ 335.797842] g_ether gadget: rndis reqa1.01 v0000 i0000 l4096
[ 335.804473] g_ether gadget: rndis req21.00 v0000 i0000 l36
[ 335.810456] gen_ndis_query_resp: RNDIS_OID_GEN_RCV_NO_BUFFER -> normal read
[ 335.821753] g_ether gadget: rndis reqa1.01 v0000 i0000 l4096
[ 348.741461] g_ether gadget: rndis req21.00 v0000 i0000 l12
[ 348.766563] pch_udc 0000:05:02.4: ES -> !!! not normal what is ES!!!
[ 348.770744] rndis_msg_parser: unknown RNDIS message 0x80000004 len 28
[ 348.777492] rndis_msg_parser00000000: 04 00 00 80 1c 00 00 00 d2 33 00 00 00 00 00 00 .........3......
[ 348.787334] rndis_msg_parser00000010: 04 00 00 00 10 00 00 00 41 00 00 00 ........A...
[ 348.796795] RNDIS command error -524, 0/12 -> result of ES is a read error !?
[ 348.801379] g_ether gadget: reset config
[ 348.805549] g_ether gadget: rndis deactivated
[ 348.810159] usb0: gether_disconnect
[ 348.822880] pch_udc 0000:05:02.4: USB_RESET
[ 348.910541] pch_udc 0000:05:02.4: pch_udc_ep_clear_nak: RxFIFO not Empty
[ 348.917637] pch_udc 0000:05:02.4: USB_ENUM
[ 354.814204] pch_udc 0000:05:02.4: ES -> my new friend is here and he never leaves.
[ 354.818381] g_ether gadget: setup complete --> -108, 0/18
[ 354.824112] pch_udc 0000:05:02.4: USB_RESET
[ 354.828589] pch_udc 0000:05:02.4: USB_ENUM
[ 360.794105] pch_udc 0000:05:02.4: ES
[ 360.798288] g_ether gadget: setup complete --> -108, 0/18
[ 360.804088] pch_udc 0000:05:02.4: USB_RESET
[ 360.808587] pch_udc 0000:05:02.4: USB_ENUM
[ 366.813821] pch_udc 0000:05:02.4: ES
[ 366.817946] g_ether gadget: setup complete --> -108, 0/18
[ 366.823648] pch_udc 0000:05:02.4: USB_RESET
[ 366.828116] pch_udc 0000:05:02.4: USB_ENUM
[ 372.293541] pch_udc 0000:05:02.4: ES
[ 372.297414] g_ether gadget: suspend
[ 372.304110] pch_udc 0000:05:02.4: USB_SUSPEND
[ 372.581917] g_ether gadget: setup complete --> -108, 0/18
Ok. The pch_udc.c code tells me:
/* ES interrupt, IDLE > 3ms on the USB */
if (dev_intr & UDC_DEVINT_ES)
dev_dbg(&dev->pdev->dev, "ES\n");
Sebastian, can you tell my more about ES interrupt?
When I change the rt-config to low-latency-desktop (not RT) my ES friend comes never up an the gadget works well.
Greetings
Alexander
--
To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: CONFIG_PREEMPT_RT_FULL an usb gadget
2013-10-14 14:26 Hänel-Baas, Alexander
@ 2013-10-18 14:35 ` Sebastian Andrzej Siewior
2014-04-07 19:30 ` David Lopo
0 siblings, 1 reply; 9+ messages in thread
From: Sebastian Andrzej Siewior @ 2013-10-18 14:35 UTC (permalink / raw)
To: Hänel-Baas, Alexander; +Cc: linux-rt-users@vger.kernel.org
* Hänel-Baas, Alexander | 2013-10-14 14:26:51 [+0000]:
>Hello Sebastian,
Hello Alexander,
>nice to hear from you.
>
>Yes I have disable ehci & ohci with no changes.
>
>But the following dmesg shows the problem:
>
>[ 335.682365] gen_ndis_query_resp: RNDIS_OID_GEN_RCV_NO_BUFFER -> normal read
>[ 335.693595] g_ether gadget: rndis reqa1.01 v0000 i0000 l4096
>[ 335.700148] g_ether gadget: rndis req21.00 v0000 i0000 l36
>[ 335.713727] g_ether gadget: rndis reqa1.01 v0000 i0000 l4096
>[ 335.720236] g_ether gadget: rndis req21.00 v0000 i0000 l36
>[ 335.733730] g_ether gadget: rndis reqa1.01 v0000 i0000 l4096
>[ 335.740482] g_ether gadget: rndis req21.00 v0000 i0000 l36
>[ 335.746520] gen_ndis_query_resp: RNDIS_OID_GEN_RCV_NO_BUFFER -> normal read
>[ 335.757582] g_ether gadget: rndis reqa1.01 v0000 i0000 l4096
>[ 335.764220] g_ether gadget: rndis req21.00 v0000 i0000 l36
>[ 335.777721] g_ether gadget: rndis reqa1.01 v0000 i0000 l4096
>[ 335.784467] g_ether gadget: rndis req21.00 v0000 i0000 l36
>[ 335.797842] g_ether gadget: rndis reqa1.01 v0000 i0000 l4096
>[ 335.804473] g_ether gadget: rndis req21.00 v0000 i0000 l36
>[ 335.810456] gen_ndis_query_resp: RNDIS_OID_GEN_RCV_NO_BUFFER -> normal read
>[ 335.821753] g_ether gadget: rndis reqa1.01 v0000 i0000 l4096
>[ 348.741461] g_ether gadget: rndis req21.00 v0000 i0000 l12
>[ 348.766563] pch_udc 0000:05:02.4: ES -> !!! not normal what is ES!!!
This is specific to the pch_udc you are using. The manual of your SoC
should describe this. But looking at the time stamps "348 - 335", there
were 13 seconds of nothing. The following packet might be a reminder of
the host…
>[ 348.770744] rndis_msg_parser: unknown RNDIS message 0x80000004 len 28
>[ 348.777492] rndis_msg_parser00000000: 04 00 00 80 1c 00 00 00 d2 33 00 00 00 00 00 00 .........3......
>[ 348.787334] rndis_msg_parser00000010: 04 00 00 00 10 00 00 00 41 00 00 00 ........A...
>[ 348.796795] RNDIS command error -524, 0/12 -> result of ES is a read error !?
>[ 348.801379] g_ether gadget: reset config
>[ 348.805549] g_ether gadget: rndis deactivated
>[ 348.810159] usb0: gether_disconnect
>[ 348.822880] pch_udc 0000:05:02.4: USB_RESET
>[ 348.910541] pch_udc 0000:05:02.4: pch_udc_ep_clear_nak: RxFIFO not Empty
>[ 348.917637] pch_udc 0000:05:02.4: USB_ENUM
>[ 354.814204] pch_udc 0000:05:02.4: ES -> my new friend is here and he never leaves.
Maybe it is an error condition which is not processed and the error
remains. So if this interrupt source remains active then it would
explain your busy loop.
But back to rndis: ES does not mean read error. The message your host sent
can not be processed by the gadget because it does not understand it.
You see this by "unknown RNDIS message" in the output and the command
err -524 aka -ENOTSUPP. As a result the gadget NAKs that requests and
the hosts does not like it, resets the USB bus and starts over.
>Ok. The pch_udc.c code tells me:
>
>/* ES interrupt, IDLE > 3ms on the USB */
> if (dev_intr & UDC_DEVINT_ES)
> dev_dbg(&dev->pdev->dev, "ES\n");
>
>Sebastian, can you tell my more about ES interrupt?
It is pch_udc specific. The manual should know more about it but seems
it shows up if the usb bus is idle. I have no idea why this should be an
error condition.
If I remember RNDIS correctly, then the host sends a "few" ep0 requests
to query some informations. The UDC just waits for ep0 packets to arrive
and us prcessing the requests. This is probably what the
| rndis req21.00 v0000 i0000 l12
output is showing you.
The ep0 communication is usually a little more compilcated compared to
ep1+ because you have only one endpoint in both direction and you need
know when you read and when you are allowed to write / send data. There
might be a timming related bug in the driver.
Since you control both sides, you should be able see which message the
hosts sends, which message the gadget recevies (is it the same) and the
other way around. Based on this you could atleast understand why the
hosts sends the "0x80000004" which the gadget does not understand. It
should not do so in non-RT case.
Once you see the messages exchanged in RT and non-RT case you should see
a difference which should help you to track the bug.
>
>When I change the rt-config to low-latency-desktop (not RT) my ES friend comes never up an the gadget works well.
>
>
>Greetings
>
>Alexander
Sebastian
--
To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2014-04-07 19:35 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-27 14:54 CONFIG_PREEMPT_RT_FULL an usb gadget Hänel-Baas, Alexander
2013-08-29 11:35 ` Sebastian Andrzej Siewior
[not found] ` <9BA84827B30CBE4996725F98F7DC91232F955F47@SMExchange01.siebmeyer.org>
2013-08-29 18:58 ` AW: " Sebastian Andrzej Siewior
2013-09-03 7:02 ` AW: " Hänel-Baas, Alexander
2013-09-12 11:41 ` Hänel-Baas, Alexander
2013-10-11 9:39 ` Sebastian Andrzej Siewior
-- strict thread matches above, loose matches on Subject: below --
2013-10-14 14:26 Hänel-Baas, Alexander
2013-10-18 14:35 ` Sebastian Andrzej Siewior
2014-04-07 19:30 ` David Lopo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).