usb: Increment HcFmNumber in EOF function

This commit is contained in:
Cacodemon345
2023-05-07 01:05:35 +06:00
parent 9e3f11d62e
commit 81114030bd

View File

@@ -243,6 +243,7 @@ void
ohci_end_of_frame(usb_t* dev)
{
/* TODO: Put endpoint and transfer descriptor processing here. */
dev->ohci_mmio_w[OHCI_HcFmNumber / 2]++;
}
void
@@ -262,8 +263,9 @@ ohci_update_frame_counter(void* priv)
dev->ohci_mmio_w[OHCI_HcFmRemaining / 2] = dev->ohci_mmio_w[OHCI_HcFmInterval / 2] & 0x3fff;
dev->ohci_mmio_l[OHCI_HcFmRemaining / 4] &= ~(1 << 31);
dev->ohci_mmio_l[OHCI_HcFmRemaining / 4] |= dev->ohci_mmio_l[OHCI_HcFmInterval / 4] & (1 << 31);
dev->ohci_mmio_w[OHCI_HcFmNumber / 2]++;
ohci_start_of_frame(dev);
timer_on_auto(&dev->ohci_frame_timer, 1. / (12. * 1000. * 1000.));
return;
}
if (dev->ohci_mmio_w[OHCI_HcFmRemaining / 2]) dev->ohci_mmio_w[OHCI_HcFmRemaining / 2]--;
timer_on_auto(&dev->ohci_frame_timer, 1. / (12. * 1000. * 1000.));