Hi guys,
iman and I have been exchanging emails back and forth and he has been very patient with me. Unfortunately, I have had very little time to help.
With what I have seen, his interrupt code is correct and working. I believe the problem is with the xHCI itself.
Here are my suggestions, which some of them I have already suggested to him and he has investigated.
- The xHC_OPS_USBStatus register must be written to as the first register written within your handler.
- After the Status register has been written, read the xHC_INTERRUPTER_IMAN register.
- If the bottom two bits are set, write it back, and then do the Handler's work.
- Remember that you have to advanced the xHC_INTERRUPTER_DEQUEUE register to the next location, which by doing so, clears the "busy" bit.
After checking this, check that you are actually writing the next TRB to the correct place. Your interrupts may be perfectly correct, you might just be incorrectly adding TRBs to the list.
Again, sorry for my absence. I have been quite busy with other things.
Ben
-
http://www.fysnet.net/osdesign_book_series.htm