Hello, I am implementing OHCI to support a basic USB device. When configuring interrupts, the endpoint does not appear in hcca.headDone and does not generate hardware interrupts. The simple drivers I have seen all check the entire interrupt_table periodically. Is it correct to check the table 1000 times/second, or am I missing some practical implementation? Does EHCI work similarly?
Thanks.
How to handle interrupts in OHCI
Re: How to handle interrupts in OHCI
In my experience, some OHCI implementations do not generate the expected interrupts, so I use a 1 ms timer as a backup strategy. In fact, I think it would be reasonable to always use a 1 ms timer and ignore the interrupts.
Re: How to handle interrupts in OHCI
According to the Linux source code, you should just read and handle the interrupt status register. However, the function just in front of the one I linked also exists to handle host controllers that don't update the done queue at all. So that seems to be a common problem.
Carpe diem!
Re: How to handle interrupts in OHCI
It has been quite a while since I did anything with the OHCI, though I do remember something about some controllers not handling interrupts correctly, especially with the DoneQueue mechanism. I would have to find my notes to be more specific.
Have you tried Bochs? Setting the config to write DEBUG lines to your log file, might help.
Ben
- https://www.fysnet.net/the_universal_serial_bus.htm
Have you tried Bochs? Setting the config to write DEBUG lines to your log file, might help.
Ben
- https://www.fysnet.net/the_universal_serial_bus.htm