usb hub: ohci interrupt for port, port GET_STATUS
Posted: Sat Jun 03, 2023 4:54 pm
Briefly: I'm using qemu to emulate a usb hub. The interrupt endpoint is set up using the OHCI controller. The interrupt transfer is posted by the OHCI controller, so I immediately send a setup TD to send GET_STATUS to the port. To my surprise, I get a second interrupt transfer posted before the GET_STATUS response, which makes it impossible to send a CLEAR_FEATURE to the port to stop the interrupt from firing.
2 x interrupts? Something feels off.
Yes, it kind of makes sense. I can live with it. But I wanted to check if there is no better solution than what I currently have. I ignore all interrupts from the interrupt endpoint until I've completed GET_STATUS and done a CLEAR_FEATURE to clear the set bits that triggered the interrupt. Or, alternatively I could block the interrupt transfer in the controller, but that would prevent interrupts from the other ports on the hub so I think that's incorrect.
Any suggestions for a way to respond to the interrupt TD with successful GET_STATUS and CLEAR_FEATURE TD's before getting additional interrupt TD's?
2 x interrupts? Something feels off.
Yes, it kind of makes sense. I can live with it. But I wanted to check if there is no better solution than what I currently have. I ignore all interrupts from the interrupt endpoint until I've completed GET_STATUS and done a CLEAR_FEATURE to clear the set bits that triggered the interrupt. Or, alternatively I could block the interrupt transfer in the controller, but that would prevent interrupts from the other ports on the hub so I think that's incorrect.
Any suggestions for a way to respond to the interrupt TD with successful GET_STATUS and CLEAR_FEATURE TD's before getting additional interrupt TD's?