usb: don't process EOF on very first SOF

This commit is contained in:
Cacodemon345
2023-05-08 17:13:34 +06:00
committed by GitHub
parent 63e95adce3
commit 2fac3e5dc5

View File

@@ -552,7 +552,8 @@ void
ohci_end_of_frame(usb_t* dev)
{
usb_hcca_t hcca;
/* TODO: Put endpoint and transfer descriptor processing here. */
if (dev->ohci_initial_start)
return;
dma_bm_read(dev->ohci_mmio[OHCI_HcHCCA].l, (uint8_t*)&hcca, sizeof(usb_hcca_t), 4);
if (dev->ohci_mmio[OHCI_HcControl].l & OHCI_HcControl_PeriodicListEnable) {
@@ -605,6 +606,7 @@ ohci_end_of_frame(usb_t* dev)
void
ohci_start_of_frame(usb_t* dev)
{
dev->ohci_initial_start = 0;
ohci_set_interrupt(dev, OHCI_HcInterruptEnable_SO);
}