diff options
author | b14ckcat <b14ckcat@protonmail.com> | 2022-07-10 20:31:14 -0400 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-07-15 12:28:09 +0200 |
commit | 4ad437f3a79134bf7a2c5ae13e31338be9c4a0ab (patch) | |
tree | 278c49bebe7557d0a30cc9f7f7c77be38b291886 /Kernel | |
parent | 95238bdb1650740dfb530091fd5cd0d195f17e68 (diff) | |
download | serenity-4ad437f3a79134bf7a2c5ae13e31338be9c4a0ab.zip |
Kernel/USB: Support UHCI full speed bandwidth reclamation
Diffstat (limited to 'Kernel')
-rw-r--r-- | Kernel/Bus/USB/UHCI/UHCIController.cpp | 6 | ||||
-rw-r--r-- | Kernel/Bus/USB/UHCI/UHCIDescriptorTypes.h | 6 |
2 files changed, 4 insertions, 8 deletions
diff --git a/Kernel/Bus/USB/UHCI/UHCIController.cpp b/Kernel/Bus/USB/UHCI/UHCIController.cpp index 75ec88c7d2..7fa405f000 100644 --- a/Kernel/Bus/USB/UHCI/UHCIController.cpp +++ b/Kernel/Bus/USB/UHCI/UHCIController.cpp @@ -213,8 +213,10 @@ UNMAP_AFTER_INIT void UHCIController::setup_schedule() piix4_td_hack->set_max_len(0x7ff); // Null data packet piix4_td_hack->set_device_address(0x7f); piix4_td_hack->set_packet_id(PacketID::IN); - m_dummy_qh->terminate_with_stray_descriptor(piix4_td_hack); - m_dummy_qh->terminate_element_link_ptr(); + m_dummy_qh->attach_transfer_descriptor_chain(piix4_td_hack); + // Cyclically link to the full speed control QH to allow for full speed + // bandwidth reclamation during frame idle time + m_dummy_qh->link_next_queue_head(m_fullspeed_control_qh); u32* framelist = reinterpret_cast<u32*>(m_framelist->vaddr().as_ptr()); for (int frame = 0; frame < UHCI_NUMBER_OF_FRAMES; frame++) { diff --git a/Kernel/Bus/USB/UHCI/UHCIDescriptorTypes.h b/Kernel/Bus/USB/UHCI/UHCIDescriptorTypes.h index 8cae746922..5b14bfe1f8 100644 --- a/Kernel/Bus/USB/UHCI/UHCIDescriptorTypes.h +++ b/Kernel/Bus/USB/UHCI/UHCIDescriptorTypes.h @@ -296,12 +296,6 @@ struct alignas(16) QueueHead { m_element_link_ptr = m_element_link_ptr | static_cast<u32>(LinkPointerBits::QHSelect); } - void terminate_with_stray_descriptor(TransferDescriptor* td) - { - m_link_ptr = td->paddr(); - m_link_ptr |= static_cast<u32>(LinkPointerBits::Terminate); - } - // TODO: Should we pass in an array or vector of TDs instead???? void attach_transfer_descriptor_chain(TransferDescriptor* td) { |