summaryrefslogtreecommitdiff
path: root/Kernel/Bus/USB/USBPipe.cpp
AgeCommit message (Collapse)Author
2022-07-12Everywhere: Add sv suffix to strings relying on StringView(char const*)sin-ack
Each of these strings would previously rely on StringView's char const* constructor overload, which would call __builtin_strlen on the string. Since we now have operator ""sv, we can replace these with much simpler versions. This opens the door to being able to remove StringView(char const*). No functional changes.
2022-07-03Kernel/USB: Move buffer allocation from USB transfer to USB pipeb14ckcat
Currently when allocating buffers for USB transfers, it is done once for every transfer rather than once upon creation of the USB device. This commit changes that by moving allocation of buffers to the USB Pipe class where they can be reused.
2022-05-21Kernel/USB: Add support for bulk transfersb14ckcat
2021-11-08Kernel: Replace KResult and KResultOr<T> with Error and ErrorOr<T>Andreas Kling
We now use AK::Error and AK::ErrorOr<T> in both kernel and userspace! This was a slightly tedious refactoring that took a long time, so it's not unlikely that some bugs crept in. Nevertheless, it does pass basic functionality testing, and it's just real nice to finally see the same pattern in all contexts. :^)
2021-09-06Kernel/USB: Use TRY() and adopt_nonnull_own_or_enomem() some moreAndreas Kling
2021-09-06Kernel/USB: Tidy up USB::Transfer constructionAndreas Kling
2021-09-05Kernel/USB: Use TRY() in the various USB classesAndreas Kling
2021-08-19Kernel/USB: Move UHCI related structures to subdirectoryJesse Buhagiar
The number of UHCI related files is starting to expand to the point where it's best if we move this into their own subdirectory. It'll also make it easier to manage when we decide to add some more controller types (whenever that may be)
2021-08-14Kernel/USB: Pass in device address as last argument to Pipe constructorLuke
The order of poll_interval and device_address was flipped.
2021-08-09Kernel/USB: Create controller base class and introduce USBManagementLuke
This removes Pipes dependency on the UHCIController by introducing a controller base class. This will be used to implement other controllers such as OHCI. Additionally, there can be multiple instances of a UHCI controller. For example, multiple UHCI instances can be required for systems with EHCI controllers. EHCI relies on using multiple of either UHCI or OHCI controllers to drive USB 1.x devices. This means UHCIController can no longer be a singleton. Multiple instances of it can now be created and passed to the device and then to the pipe. To handle finding and creating these instances, USBManagement has been introduced. It has the same pattern as the other management classes such as NetworkManagement.
2021-07-22Everywhere: Prefix hexadecimal numbers with 0xGunnar Beutner
Depending on the values it might be difficult to figure out whether a value is decimal or hexadecimal. So let's make this more obvious. Also this allows copying and pasting those numbers into GNOME calculator and probably also other apps which auto-detect the base.
2021-07-02Kernel/USB: Move the USB components as a subfolder to the Bus directoryLiav A