diff --git a/src/portable/ohci/ohci.c b/src/portable/ohci/ohci.c index 4b1acaaa11..59afae8e16 100644 --- a/src/portable/ohci/ohci.c +++ b/src/portable/ohci/ohci.c @@ -606,6 +606,7 @@ static void done_queue_isr(uint8_t hostid) // done head is written in reversed order of completion --> need to reverse the done queue first ohci_td_item_t* td_head = list_reverse ( (ohci_td_item_t*) tu_align16(ohci_data.hcca.done_head) ); + ohci_data.hcca.done_head = 0; while( td_head != NULL ) { @@ -652,6 +653,9 @@ void hcd_int_handler(uint8_t hostid) if (int_status == 0) return; + // Disable MIE as per OHCI spec 5.3 + OHCI_REG->interrupt_disable = OHCI_INT_MASTER_ENABLE_MASK; + // Frame number overflow if ( int_status & OHCI_INT_FRAME_OVERFLOW_MASK ) { @@ -694,6 +698,8 @@ void hcd_int_handler(uint8_t hostid) } OHCI_REG->interrupt_status = int_status; // Acknowledge handled interrupt + + OHCI_REG->interrupt_enable = OHCI_INT_MASTER_ENABLE_MASK; // Enable MIE } //--------------------------------------------------------------------+ // HELPER