USB FIQ driver

Post Reply
runnerway
Posts: 130
Joined: Mon Dec 15, 2014 6:47 am
languages_spoken: en
Has thanked: 0
Been thanked: 0
Contact:

USB FIQ driver

Post by runnerway »

I've just finished porting USB FIQ driver from endlessm to Odroid C1.
It seems to work well but i didn't test it too much.

I've sent a pull request to Hardkernel too:
- https://github.com/hardkernel/linux/pull/135

If someone wants to test with me it will be great ;)

User avatar
odroid
Site Admin
Posts: 40074
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean
ODROIDs: ODROID
Has thanked: 2841 times
Been thanked: 1602 times
Contact:

Re: USB FIQ driver

Post by odroid »

Great news!
We are looking into your PR now. :)

User avatar
odroid
Site Admin
Posts: 40074
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean
ODROIDs: ODROID
Has thanked: 2841 times
Been thanked: 1602 times
Contact:

Re: USB FIQ driver

Post by odroid »

We've tested the patch. It works well with normal HID keyboard, mouse and mass storage devices.
But some low-speed HID like Apple keyboard causes below error message and all the USB ports hung.
After a few minutes whole system stop. Unplugging the USB port caused the issue.

Code: Select all

[   46.913332@0] hub 1-1.3:1.0: cannot reset port 2 (err = -71)
[   46.918872@0] DEBUG:handle_hc_chhltd_intr_dma:: XactErr without NYET/NAK/ACK
[   46.918872@0] 
[   46.918902@0] DEBUG:handle_hc_chhltd_intr_dma:: XactErr without NYET/NAK/ACK
[   46.918902@0] 
[   46.918931@0] DEBUG:handle_hc_chhltd_intr_dma:: XactErr without NYET/NAK/ACK
[   46.918931@0] 
[   46.919054@0] hub 1-1.3:1.0: cannot reset port 2 (err = -71)
[   46.924581@0] hub 1-1.3:1.0: Cannot enable port 2.  Maybe the USB cable is bad?
[   46.931902@0] DEBUG:handle_hc_chhltd_intr_dma:: XactErr without NYET/NAK/ACK
[   46.931902@0] 
[   46.931949@0] Transfer to device 3 endpoint 0x2 frame 1607 failed - FIQ reported NYET. Data may have been lost.
[   46.931971@0] DEBUG:handle_hc_chhltd_intr_dma:: XactErr without NYET/NAK/ACK
[   46.931971@0] 
[   46.932018@0] DEBUG:handle_hc_chhltd_intr_dma:: XactErr without NYET/NAK/ACK
[   46.932018@0] 
[   46.932052@0] hub 1-1.3:1.0: cannot disable port 2 (err = -71)
[   46.937627@0] usb 1-1.3: USB disconnect, device number 4
[   46.937636@0] usb 1-1.3.2: USB disconnect, device number 5

[  245.068142@1] BUG: using smp_processor_id() in preemptible [00000000] code: khungtaskd/44
[  245.080171@1] Kernel panic - not syncing: hung_task: blocked tasks
[  245.082021@1] CPU: 1 PID: 44 Comm: khungtaskd Not tainted 3.10.80 #4
[  245.088365@1] [<c0014ea4>] (unwind_backtrace+0x0/0xec) from [<c0011eb0>] (show_stack+0x10/0x14)
[  245.097044@1] [<c0011eb0>] (show_stack+0x10/0x14) from [<c06a45fc>] (panic+0xa0/0x1f0)
[  245.104945@1] [<c06a45fc>] (panic+0xa0/0x1f0) from [<c0094ba8>] (watchdog+0x248/0x28c)
[  245.112845@1] [<c0094ba8>] (watchdog+0x248/0x28c) from [<c004bff0>] (kthread+0xb0/0xb4)
[  245.120835@1] [<c004bff0>] (kthread+0xb0/0xb4) from [<c000e0a0>] (ret_from_fork+0x14/0x34)
[  245.129086@0] CPU0: stopping
[  245.131950@0] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 3.10.80 #4
[  245.138121@0] [<c0014ea4>] (unwind_backtrace+0x0/0xec) from [<c0011eb0>] (show_stack+0x10/0x14)
[  245.146799@0] [<c0011eb0>] (show_stack+0x10/0x14) from [<c0013784>] (handle_IPI+0xd4/0x17c)
[  245.155136@0] [<c0013784>] (handle_IPI+0xd4/0x17c) from [<c0008478>] (gic_handle_irq+0x58/0x5c)
[  245.163820@0] [<c0008478>] (gic_handle_irq+0x58/0x5c) from [<c000dbc0>] (__irq_svc+0x40/0x70)
[  245.172325@0] Exception stack(0xc0997f70 to 0xc0997fb8)
[  245.177537@0] 7f60:                                     00000000 00000000 00487bac 00000000
[  245.185875@0] 7f80: c0996000 c09aa550 c06b2038 c0996000 c0a0f320 c0a0f320 c0996000 00000000
[  245.194211@0] 7fa0: 00000000 c0997fb8 c000f3c8 c000f3cc 60000013 ffffffff
[  245.200988@0] [<c000dbc0>] (__irq_svc+0x40/0x70) from [<c000f3cc>] (arch_cpu_idle+0x28/0x2c)
[  245.209411@0] [<c000f3cc>] (arch_cpu_idle+0x28/0x2c) from [<c00703b0>] (cpu_startup_entry+0xf4/0x150)
[  245.218619@0] [<c00703b0>] (cpu_startup_entry+0xf4/0x150) from [<c095dac4>] (start_kernel+0x334/0x340)
[  245.227903@2] CPU2: stopping
[  245.230770@2] CPU: 2 PID: 0 Comm: swapper/2 Not tainted 3.10.80 #4
[  245.236940@2] [<c0014ea4>] (unwind_backtrace+0x0/0xec) from [<c0011eb0>] (show_stack+0x10/0x14)
[  245.245621@2] [<c0011eb0>] (show_stack+0x10/0x14) from [<c0013784>] (handle_IPI+0xd4/0x17c)
[  245.253958@2] [<c0013784>] (handle_IPI+0xd4/0x17c) from [<c0008478>] (gic_handle_irq+0x58/0x5c)
[  245.262642@2] [<c0008478>] (gic_handle_irq+0x58/0x5c) from [<c000dbc0>] (__irq_svc+0x40/0x70)
[  245.271148@2] Exception stack(0xef2a1fa0 to 0xef2a1fe8)
[  245.276362@2] 1fa0: 00000002 00000000 000086a6 00000000 ef2a0000 c09aa550 c06b2038 ef2a0030
[  245.284698@2] 1fc0: c0a0f320 c0a0f320 ef2a0000 00000000 00000000 ef2a1fe8 c000f3c8 c000f3cc
[  245.293032@2] 1fe0: 60010013 ffffffff
[  245.296685@2] [<c000dbc0>] (__irq_svc+0x40/0x70) from [<c000f3cc>] (arch_cpu_idle+0x28/0x2c)
[  245.305107@2] [<c000f3cc>] (arch_cpu_idle+0x28/0x2c) from [<c00703b0>] (cpu_startup_entry+0xf4/0x150)
[  245.314312@2] [<c00703b0>] (cpu_startup_entry+0xf4/0x150) from [<008a1044>] (0x8a1044)
[  245.322209@3] CPU3: stopping
[  245.325077@3] CPU: 3 PID: 0 Comm: swapper/3 Not tainted 3.10.80 #4
[  245.331247@3] [<c0014ea4>] (unwind_backtrace+0x0/0xec) from [<c0011eb0>] (show_stack+0x10/0x14)
[  245.339929@3] [<c0011eb0>] (show_stack+0x10/0x14) from [<c0013784>] (handle_IPI+0xd4/0x17c)
[  245.348266@3] [<c0013784>] (handle_IPI+0xd4/0x17c) from [<c0008478>] (gic_handle_irq+0x58/0x5c)
[  245.356950@3] [<c0008478>] (gic_handle_irq+0x58/0x5c) from [<c000dbc0>] (__irq_svc+0x40/0x70)
[  245.365455@3] Exception stack(0xef2a3fa0 to 0xef2a3fe8)
[  245.370669@3] 3fa0: 00000003 00000000 0000a7ec 00000000 ef2a2000 c09aa550 c06b2038 ef2a2030
[  245.379006@3] 3fc0: c0a0f320 c0a0f320 ef2a2000 00000000 00000000 ef2a3fe8 c000f3c8 c000f3cc
[  245.387339@3] 3fe0: 600f0013 ffffffff
[  245.390992@3] [<c000dbc0>] (__irq_svc+0x40/0x70) from [<c000f3cc>] (arch_cpu_idle+0x28/0x2c)
[  245.399415@3] [<c000f3cc>] (arch_cpu_idle+0x28/0x2c) from [<c00703b0>] (cpu_startup_entry+0xf4/0x150)
[  245.408619@3] [<c00703b0>] (cpu_startup_entry+0xf4/0x150) from [<008a1044>] (0x8a1044)
USB sound cards also showed a similar problem when unplug the device.

Code: Select all

[  126.172342@0] cannot submit urb (err = -19)
We need to check what causes the problem. But the patch size is really big. :(

runnerway
Posts: 130
Joined: Mon Dec 15, 2014 6:47 am
languages_spoken: en
Has thanked: 0
Been thanked: 0
Contact:

Re: USB FIQ driver

Post by runnerway »

I spoke with the developer of this driver: the driver is not ready and has some problems that he is trying to solve.

I will come back here with some news when it will be ready! :)

User avatar
odroid
Site Admin
Posts: 40074
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean
ODROIDs: ODROID
Has thanked: 2841 times
Been thanked: 1602 times
Contact:

Re: USB FIQ driver

Post by odroid »

Thank you for the status update.
I hope the developer can solve the issue because the FIQ USB driver could reduce the system overhead a lot.

ccaione
Posts: 13
Joined: Fri Oct 23, 2015 4:52 pm
languages_spoken: english
Has thanked: 0
Been thanked: 0
Contact:

Re: USB FIQ driver

Post by ccaione »

Hey guys, I'm the developer who is trying to make this working.

I have posted the latest version of the code here https://github.com/endlessm/linux-meson ... b-refactor
I have fixed a bunch of problems with the latest commits but it needs to be carefully tested. Could you give it a shot?

Let me know ;)

User avatar
odroid
Site Admin
Posts: 40074
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean
ODROIDs: ODROID
Has thanked: 2841 times
Been thanked: 1602 times
Contact:

Re: USB FIQ driver

Post by odroid »

Great! Nice to meet you!
We will try the latest code early next week since it is already 18:00 Friday in Korea. ;)

runnerway
Posts: 130
Joined: Mon Dec 15, 2014 6:47 am
languages_spoken: en
Has thanked: 0
Been thanked: 0
Contact:

Re: USB FIQ driver

Post by runnerway »

odroid wrote:Great! Nice to meet you!
We will try the latest code early next week since it is already 18:00 Friday in Korea. ;)
I've updated the pull request (https://github.com/hardkernel/linux/pull/135) with new code adapted for C1.

Maybe i will start testing later today.. ;)

XeoSal
Posts: 925
Joined: Sun Aug 30, 2015 11:21 pm
languages_spoken: English
ODROIDs: C1, C1+, C2 & XU4
Has thanked: 0
Been thanked: 0
Contact:

Re: USB FIQ driver

Post by XeoSal »

Very nice work guys @ccaione @runnerway, we're all supporting you, if you need any help do not hesitate to ask I am ready to contribute.

runnerway
Posts: 130
Joined: Mon Dec 15, 2014 6:47 am
languages_spoken: en
Has thanked: 0
Been thanked: 0
Contact:

Re: USB FIQ driver

Post by runnerway »

Just tested with USB Keyboard and USB Audio Card and seems to work without problems but Odroid should test with their usb sound card which had problems with previous version.

XeoSal wrote:Very nice work guys @ccaione @runnerway, we're all supporting you, if you need any help do not hesitate to ask I am ready to contribute.
Please! I did nothing! Only ccaione deserves thanks. ;)

ccaione
Posts: 13
Joined: Fri Oct 23, 2015 4:52 pm
languages_spoken: english
Has thanked: 0
Been thanked: 0
Contact:

Re: USB FIQ driver

Post by ccaione »

odroid wrote:Great! Nice to meet you!
We will try the latest code early next week since it is already 18:00 Friday in Korea. ;)
Any feedback?

User avatar
odroid
Site Admin
Posts: 40074
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean
ODROIDs: ODROID
Has thanked: 2841 times
Been thanked: 1602 times
Contact:

Re: USB FIQ driver

Post by odroid »

Sorry for late reply.
We merged the new PR and it had the same issue when we unplugged some problematic USB devices.
We've tried to solve the issue by ourselves but no pgrogress yet.

We will try your original code in the endlessm github tomorrow.

runnerway
Posts: 130
Joined: Mon Dec 15, 2014 6:47 am
languages_spoken: en
Has thanked: 0
Been thanked: 0
Contact:

Re: USB FIQ driver

Post by runnerway »

odroid wrote:Sorry for late reply.
We merged the new PR and it had the same issue when we unplugged some problematic USB devices.
We've tried to solve the issue by ourselves but no pgrogress yet.

We will try your original code in the endlessm github tomorrow.
Are problems 'freezes after unplugging Apple keyboard'? Other examples?

The only thing I can suggest is to try to revert only the latest three commits related to USB gadget.
Maybe they breaks something. Otherwise the code of usb drivers is exactly the same as the original.

User avatar
odroid
Site Admin
Posts: 40074
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean
ODROIDs: ODROID
Has thanked: 2841 times
Been thanked: 1602 times
Contact:

Re: USB FIQ driver

Post by odroid »

Mostly old HID devices have the problem if they are low-speed (1.5Mbps) USB interface.
The patch of USB gadget was very helpful for whom needs more stable/compatible gadget function.
Anyway, we will roll back the commits and try it again.

BTW, could you observe much lower number on USB interrupts count?

ccaione
Posts: 13
Joined: Fri Oct 23, 2015 4:52 pm
languages_spoken: english
Has thanked: 0
Been thanked: 0
Contact:

Re: USB FIQ driver

Post by ccaione »

odroid wrote:Mostly old HID devices have the problem if they are low-speed (1.5Mbps) USB interface.
Interesting. Could you paste the log somewhere so I can take a look?
odroid wrote:BTW, could you observe much lower number on USB interrupts count?
Definitely. You can easily check that without any USB device connected the IRQ/s count is almost 0.

User avatar
odroid
Site Admin
Posts: 40074
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean
ODROIDs: ODROID
Has thanked: 2841 times
Been thanked: 1602 times
Contact:

Re: USB FIQ driver

Post by odroid »

ccaione wrote:Interesting. Could you paste the log somewhere so I can take a look?
I alreayd posted the log on this thread. :)
http://forum.odroid.com/viewtopic.php?f ... 85#p110823
ccaione wrote:Definitely. You can easily check that without any USB device connected the IRQ/s count is almost 0.
Yes, we have the same result of dwc_otg IRQs via "cat /proc/interrupts"
Except for the kernel panic, everything looks fine.

Your patch will solve this famous issue probably.
http://forum.odroid.com/viewtopic.php?f=117&t=9976
http://forum.odroid.com/viewtopic.php?f=112&t=7641
But they have a low-speed USB keyboard which causes the kernel panic. :(

ccaione
Posts: 13
Joined: Fri Oct 23, 2015 4:52 pm
languages_spoken: english
Has thanked: 0
Been thanked: 0
Contact:

Re: USB FIQ driver

Post by ccaione »

odroid wrote: I alreayd posted the log on this thread. :)
http://forum.odroid.com/viewtopic.php?f ... 85#p110823
Yeah, I mean the whole journal log :)
odroid wrote:Yes, we have the same result of dwc_otg IRQs via "cat /proc/interrupts"
Except for the kernel panic, everything looks fine.
When applying my patches try also to bisect them.
odroid wrote:Your patch will solve this famous issue probably.
http://forum.odroid.com/viewtopic.php?f=117&t=9976
http://forum.odroid.com/viewtopic.php?f=112&t=7641
But they have a low-speed USB keyboard which causes the kernel panic. :(
Yeah, we experienced the same problems and the patches helped a lot.

User avatar
odroid
Site Admin
Posts: 40074
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean
ODROIDs: ODROID
Has thanked: 2841 times
Been thanked: 1602 times
Contact:

Re: USB FIQ driver

Post by odroid »

We will try it again tomorrow and get back to you with the journal log if we still have the issue.

BTW, do you have any low-speed USB keyboard in your office?

ccaione
Posts: 13
Joined: Fri Oct 23, 2015 4:52 pm
languages_spoken: english
Has thanked: 0
Been thanked: 0
Contact:

Re: USB FIQ driver

Post by ccaione »

odroid wrote:We will try it again tomorrow and get back to you with the journal log if we still have the issue.

BTW, do you have any low-speed USB keyboard in your office?
Nope, this is the real problem :) All the USB devices I have work fine. I'll figure something out.

ccaione
Posts: 13
Joined: Fri Oct 23, 2015 4:52 pm
languages_spoken: english
Has thanked: 0
Been thanked: 0
Contact:

Re: USB FIQ driver

Post by ccaione »

odroid wrote:Mostly old HID devices have the problem if they are low-speed (1.5Mbps) USB interface.
The patch of USB gadget was very helpful for whom needs more stable/compatible gadget function.
Anyway, we will roll back the commits and try it again.
Ok, I found a keyboard that is seen as low-speed USB. But I have no problem whatsoever using it with my patches.
Can you please clarify how do you get the panic? Just using it or connecting/disconnecting several times?
odroid wrote:BTW, could you observe much lower number on USB interrupts count?
BTW, do you see a reduction in the IRQ/s also when devices are connected?

User avatar
odroid
Site Admin
Posts: 40074
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean
ODROIDs: ODROID
Has thanked: 2841 times
Been thanked: 1602 times
Contact:

Re: USB FIQ driver

Post by odroid »

I should tell you all the low-speed USB keyboard don't show the same kernel panic.
We will test it tomorrow. it is already 23:30 here.

Is there any way to see the number of FIQ count via proc or sysfs?

ccaione
Posts: 13
Joined: Fri Oct 23, 2015 4:52 pm
languages_spoken: english
Has thanked: 0
Been thanked: 0
Contact:

Re: USB FIQ driver

Post by ccaione »

odroid wrote:I should tell you all the low-speed USB keyboard don't show the same kernel panic.
We will test it tomorrow. it is already 23:30 here.
Oh, interesting.
odroid wrote:Is there any way to see the number of FIQ count via proc or sysfs?
No, the only thing that we can do is to check the number of IRQ count for the TIMERD that is used as IRQ bridge toward the USB framework (basically it says how many USB IRQ are being actually processed by the kernel).

User avatar
odroid
Site Admin
Posts: 40074
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean
ODROIDs: ODROID
Has thanked: 2841 times
Been thanked: 1602 times
Contact:

Re: USB FIQ driver

Post by odroid »

We've fighted again the low-speed USB issue all day long. We rolled back all the recent several changes.
But it still showed the same panic message when we unplugged the low-speed USB keyboard.
We also found another old keyboard which has the 1.5Mbps low-speed USB interface. It showed the same result.
I will gather more logs and post it here tomorrow. We are exhausted today.

@ccaione
Did you use our C1 board to test it? Or your own board?

Anyway, if we can't fix the low-speed USB keyboard issue, we will make a trial kernel update package early next week.
And post "Call for test" to find some community members who can help our debugging.

ccaione
Posts: 13
Joined: Fri Oct 23, 2015 4:52 pm
languages_spoken: english
Has thanked: 0
Been thanked: 0
Contact:

Re: USB FIQ driver

Post by ccaione »

odroid wrote:We've fighted again the low-speed USB issue all day long. We rolled back all the recent several changes.
But it still showed the same panic message when we unplugged the low-speed USB keyboard.
We also found another old keyboard which has the 1.5Mbps low-speed USB interface. It showed the same result.
I will gather more logs and post it here tomorrow. We are exhausted today.
Thank you for testing this.
odroid wrote:@ccaione
Did you use our C1 board to test it? Or your own board?
I have used my own board. Today I'll test this also on C1. I'll keep you updated.
odroid wrote:Anyway, if we can't fix the low-speed USB keyboard issue, we will make a trial kernel update package early next week.
And post "Call for test" to find some community members who can help our debugging.
This would be great. Thanks.

User avatar
odroid
Site Admin
Posts: 40074
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean
ODROIDs: ODROID
Has thanked: 2841 times
Been thanked: 1602 times
Contact:

Re: USB FIQ driver

Post by odroid »

ccaione wrote: I have used my own board. Today I'll test this also on C1. I'll keep you updated.
The reason why asked you is we are using a MTT USB hub IC(GL852G) on the C1/C1+.
So I was just curious what kind of hub is mounted on your board.
Please let me know your hub controller IC part number.

ccaione
Posts: 13
Joined: Fri Oct 23, 2015 4:52 pm
languages_spoken: english
Has thanked: 0
Been thanked: 0
Contact:

Re: USB FIQ driver

Post by ccaione »

odroid wrote:
ccaione wrote: I have used my own board. Today I'll test this also on C1. I'll keep you updated.
The reason why asked you is we are using a MTT USB hub IC(GL852G) on the C1/C1+.
So I was just curious what kind of hub is mounted on your board.
Please let me know your hub controller IC part number.
Same here: GL852G. Probably I just do not have the right USB devices to reproduce the issue.

ccaione
Posts: 13
Joined: Fri Oct 23, 2015 4:52 pm
languages_spoken: english
Has thanked: 0
Been thanked: 0
Contact:

Re: USB FIQ driver

Post by ccaione »

runnerway wrote:
odroid wrote:Great! Nice to meet you!
We will try the latest code early next week since it is already 18:00 Friday in Korea. ;)
I've updated the pull request (https://github.com/hardkernel/linux/pull/135) with new code adapted for C1.

Maybe i will start testing later today.. ;)
@runnerway
I just noticed that you pushed some of my commits in that PR modifying them but leaving my signed-off and authorship. Please, do not do that. If you feel that something has to be modified just push a new commit with a new authorship.

@odroid
Probably it's better to cherry-pick directly from the endless repo.

ccaione
Posts: 13
Joined: Fri Oct 23, 2015 4:52 pm
languages_spoken: english
Has thanked: 0
Been thanked: 0
Contact:

Re: USB FIQ driver

Post by ccaione »

ccaione wrote:
odroid wrote:
ccaione wrote: I have used my own board. Today I'll test this also on C1. I'll keep you updated.
The reason why asked you is we are using a MTT USB hub IC(GL852G) on the C1/C1+.
So I was just curious what kind of hub is mounted on your board.
Please let me know your hub controller IC part number.
Same here: GL852G. Probably I just do not have the right USB devices to reproduce the issue.
Ok, I did some testing with C1 using this branch https://github.com/endlessm/linux-meson/tree/c1-fiq but I get the same results also using https://github.com/hardkernel/linux/tree/odroidc-3.10.y

- USB on C1 stops working with hid_irq_in too many eproto,try to reset device as soon as I connect my low-speed keyboard and kernel panics after a while with

Code: Select all

[  365.057834@1] INFO: task kworker/0:1:31 blocked for more than 120 seconds.
[  365.059072@1] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[  365.067479@1] BUG: using smp_processor_id() in preemptible [00000000] code: khungtaskd/43
[  365.083947@1] Kernel panic - not syncing: hung_task: blocked tasks
[  365.084494@1] CPU: 1 PID: 43 Comm: khungtaskd Not tainted 3.10.80 #8
...
- Doing the same on my hardware is perfectly fine

runnerway
Posts: 130
Joined: Mon Dec 15, 2014 6:47 am
languages_spoken: en
Has thanked: 0
Been thanked: 0
Contact:

Re: USB FIQ driver

Post by runnerway »

ccaione wrote:
ccaione wrote:
odroid wrote:
ccaione wrote: I have used my own board. Today I'll test this also on C1. I'll keep you updated.
The reason why asked you is we are using a MTT USB hub IC(GL852G) on the C1/C1+.
So I was just curious what kind of hub is mounted on your board.
Please let me know your hub controller IC part number.
Same here: GL852G. Probably I just do not have the right USB devices to reproduce the issue.
Ok, I did some testing with C1 using this branch https://github.com/endlessm/linux-meson/tree/c1-fiq but I get the same results also using https://github.com/hardkernel/linux/tree/odroidc-3.10.y

- USB on C1 stops working with hid_irq_in too many eproto,try to reset device as soon as I connect my low-speed keyboard and kernel panics after a while with

Code: Select all

[  365.057834@1] INFO: task kworker/0:1:31 blocked for more than 120 seconds.
[  365.059072@1] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[  365.067479@1] BUG: using smp_processor_id() in preemptible [00000000] code: khungtaskd/43
[  365.083947@1] Kernel panic - not syncing: hung_task: blocked tasks
[  365.084494@1] CPU: 1 PID: 43 Comm: khungtaskd Not tainted 3.10.80 #8
...
- Doing the same on my hardware is perfectly fine
It seems that this problem was already present before your patches.
Example: http://forum.odroid.com/viewtopic.php?f=112&t=8236

Probably there is something else in the kernel causing problems with low speed devices.

User avatar
odroid
Site Admin
Posts: 40074
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean
ODROIDs: ODROID
Has thanked: 2841 times
Been thanked: 1602 times
Contact:

Re: USB FIQ driver

Post by odroid »

Thank you guys. We didn't know that. :o
Let's isolate the kernel panic issue from your new FIQ enabled USB driver.

I think we may have something different in the kernel source or configuration.
I really want to compare your configuration & dts files with ours first.

runnerway
Posts: 130
Joined: Mon Dec 15, 2014 6:47 am
languages_spoken: en
Has thanked: 0
Been thanked: 0
Contact:

Re: USB FIQ driver

Post by runnerway »

Created a new pull request with updates from endlessm:
- https://github.com/hardkernel/linux/pull/145

runnerway
Posts: 130
Joined: Mon Dec 15, 2014 6:47 am
languages_spoken: en
Has thanked: 0
Been thanked: 0
Contact:

Re: USB FIQ driver

Post by runnerway »

Updated pull request with updates from endlessm:
- https://github.com/hardkernel/linux/pull/145

I think this should be merged.

ccaione
Posts: 13
Joined: Fri Oct 23, 2015 4:52 pm
languages_spoken: english
Has thanked: 0
Been thanked: 0
Contact:

Re: USB FIQ driver

Post by ccaione »

runnerway wrote:Updated pull request with updates from endlessm:
- https://github.com/hardkernel/linux/pull/145

I think this should be merged.
With the latest commit we switched from the FIQ FSM to the FIQ NOP since we were experimenting some issues with the FIQ FSM. It's not the ideal solution but it's working fine for us.

willemb
Posts: 12
Joined: Tue Sep 15, 2015 1:43 pm
languages_spoken: english
ODROIDs: c1+
Has thanked: 0
Been thanked: 0
Contact:

Re: USB FIQ driver

Post by willemb »

Any ideas how soon we can expect a kernel upgrade to address the USB issue?

User avatar
odroid
Site Admin
Posts: 40074
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean
ODROIDs: ODROID
Has thanked: 2841 times
Been thanked: 1602 times
Contact:

Re: USB FIQ driver

Post by odroid »

In a few days.
We are also merging the watch-dog-timer related patches too even it causes the delay. :(

willemb
Posts: 12
Joined: Tue Sep 15, 2015 1:43 pm
languages_spoken: english
ODROIDs: c1+
Has thanked: 0
Been thanked: 0
Contact:

Re: USB FIQ driver

Post by willemb »

ok thank you. I'd rather wait and get a good working solution. appreciate your effort.

ccaione
Posts: 13
Joined: Fri Oct 23, 2015 4:52 pm
languages_spoken: english
Has thanked: 0
Been thanked: 0
Contact:

Re: USB FIQ driver

Post by ccaione »

odroid wrote:In a few days.
We are also merging the watch-dog-timer related patches too even it causes the delay. :(
Are those patches related to the USB issue?

User avatar
odroid
Site Admin
Posts: 40074
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean
ODROIDs: ODROID
Has thanked: 2841 times
Been thanked: 1602 times
Contact:

Re: USB FIQ driver

Post by odroid »

We've merged your FIQ implementation. We also fixed the low-speed USB device unplugging crash issue too.
After update via "sudo apt-get update && sudo apt-get dist-upgrade" you will have the kernel 3.10.80-134.
The patches are available in our github too.

Really appreciate your help ccaione & runnerway !

XeoSal
Posts: 925
Joined: Sun Aug 30, 2015 11:21 pm
languages_spoken: English
ODROIDs: C1, C1+, C2 & XU4
Has thanked: 0
Been thanked: 0
Contact:

Re: USB FIQ driver

Post by XeoSal »

odroid wrote:We've merged your FIQ implementation. We also fixed the low-speed USB device unplugging crash issue too.
After update via "sudo apt-get update && sudo apt-get dist-upgrade" you will have the kernel 3.10.80-134.
The patches are available in our github too.

Really appreciate your help ccaione & runnerway !
This is fantastic! Odroid C1 is gonna rock now, I am soon pushing a kernel update for Odrobian. ;)

Edit: Odrobian now has latest kernel with this new USB driver! :D

User avatar
odroid
Site Admin
Posts: 40074
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean
ODROIDs: ODROID
Has thanked: 2841 times
Been thanked: 1602 times
Contact:

Re: USB FIQ driver

Post by odroid »


llamahunter
Posts: 65
Joined: Sat Jan 24, 2015 6:29 am
languages_spoken: english
ODROIDs: C1
Has thanked: 0
Been thanked: 0
Contact:

Re: USB FIQ driver

Post by llamahunter »

'negative feedback' puts it mildly. this kernel update has hosed my configuration. please test your code before pushing it to all users.

XeoSal
Posts: 925
Joined: Sun Aug 30, 2015 11:21 pm
languages_spoken: English
ODROIDs: C1, C1+, C2 & XU4
Has thanked: 0
Been thanked: 0
Contact:

Re: USB FIQ driver

Post by XeoSal »

Seems like the USB FIQ driver was reverted back on official git, I am not gonna revert my odrobian kernel yet though I am enjoying it very much besides currently I am facing no issues..
I am waiting for users to report issues, after this we'll see.

willemb
Posts: 12
Joined: Tue Sep 15, 2015 1:43 pm
languages_spoken: english
ODROIDs: c1+
Has thanked: 0
Been thanked: 0
Contact:

Re: USB FIQ driver

Post by willemb »

Any ideas yet why the new USB FIQ driver was causing issues? I'm tempted to apply the patch and see for myself what sorts of issues pop up.

User avatar
odroid
Site Admin
Posts: 40074
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean
ODROIDs: ODROID
Has thanked: 2841 times
Been thanked: 1602 times
Contact:

Re: USB FIQ driver

Post by odroid »

We could reproduce the issues but it is really hard to find a real root cause at this moment.
We will keep trying to find it.

ralfz
Posts: 65
Joined: Wed Mar 11, 2015 12:45 am
languages_spoken: english
Has thanked: 0
Been thanked: 0
Contact:

Re: USB FIQ driver

Post by ralfz »

Hi,

could the FIQ patch also be used for android systems? If so how to applay the patch? I'd like to test it :D

regards

User avatar
odroid
Site Admin
Posts: 40074
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean
ODROIDs: ODROID
Has thanked: 2841 times
Been thanked: 1602 times
Contact:

Re: USB FIQ driver

Post by odroid »

As far as I remember, USB drivers are same in the Android kernel.

Jojo
Posts: 532
Joined: Mon May 18, 2015 12:13 am
languages_spoken: english, german
ODROIDs: C1, C1+, C2, HC1, HC2, VU8C
Location: Germany
Has thanked: 3 times
Been thanked: 1 time
Contact:

Re: USB FIQ driver

Post by Jojo »

Hi,
odroid wrote:We could reproduce the issues but it is really hard to find a real root cause at this moment.
We will keep trying to find it.
I like to ask, if there are any news about that issue. Are you guys working on that? I just ask, because the C1 is an incredible device and it would be a pity, if this would suffer a drawback just because of buggy USB. I can imagine, that it is damn complicated...

Greetings!
How to ask questions the smart way:
http://www.catb.org/esr/faqs/smart-questions.html

User avatar
odroid
Site Admin
Posts: 40074
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean
ODROIDs: ODROID
Has thanked: 2841 times
Been thanked: 1602 times
Contact:

Re: USB FIQ driver

Post by odroid »

Frankly speaking, not at this moment.
We looked into the driver codes over 2 weeks intensively.
But we couldn't find any clue. It seems to be our limitation. :(

Jojo
Posts: 532
Joined: Mon May 18, 2015 12:13 am
languages_spoken: english, german
ODROIDs: C1, C1+, C2, HC1, HC2, VU8C
Location: Germany
Has thanked: 3 times
Been thanked: 1 time
Contact:

Re: USB FIQ driver

Post by Jojo »

odroid wrote:Frankly speaking, not at this moment.
We looked into the driver codes over 2 weeks intensively.
But we couldn't find any clue. It seems to be our limitation. :(
Oh, that is a pity :( .
But what now? It is known, that the "normal" driver has some issues, too, and makes the user often suffer of bad performance and/or instability. The FIQ driver had problems, too.
Don't get me wrong, I don't want to stress you in any way. I just ask about the perspectives.

Sadly I have no experiances in Linux driver programming. I only know, that it is known to be damn complicated. Maybe you (odroid/HK) could make use of the knowledge of the user crashoverride, who seems to know where the problem is: HERE.
How to ask questions the smart way:
http://www.catb.org/esr/faqs/smart-questions.html

biterror
Posts: 38
Joined: Tue Oct 27, 2015 4:01 pm
languages_spoken: english
ODROIDs: C1+, XU4
Has thanked: 4 times
Been thanked: 0
Contact:

Re: USB FIQ driver

Post by biterror »

Has any progress been made to fix this problem? I have the same problem when I plug in and disconnect a touch screen device a few times. First I see "hid_irq_in too many eproto,try to reset device" in syslog and after that, if we plug in the touch panel again, ODroid reboots. I just did dist-upgrade, but with 3.10.96-151, the problem still remains. We have hundreds of systems in production use and need to find a way to fix this :(

Post Reply

Return to “General Topics”

Who is online

Users browsing this forum: No registered users and 2 guests