feat(libSceUsbd): add the transfer fill helpers and the synchronous bulk and interrupt transfers #3875
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3875"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by 13hourstilliland on 2026-10-11T18:24:32Z.
What
Adds the transfer helpers FreeType titles allocate and fill through, following libusb10_io.c field for field:
sceUsbdFillBulkTransfer,sceUsbdFillIsoTransferandsceUsbdFillControlTransfer, andsceUsbdFillControlSetupwith the little-endian setup bytes.sceUsbdControlTransferGetDataandsceUsbdControlTransferGetSetup.sceUsbdSetIsoPacketLengthsandsceUsbdGetIsoPacketBuffer, whose offsets sum the earlier packet lengths.sceUsbdBulkTransferandsceUsbdInterruptTransfer, passing through to libusb's synchronous calls; a null transferred output throws, which FreeBSD writes to.Stacked on #3848; until that merges the diff shows both commits.
Tested
guest_usbd devicewithAPS5_USBD_DEVICE=3537:100fnow does the control request through the new fill helpers and completes a synchronous interrupt read on endpoint 0x81 (15-byte input report) and an asynchronous one through the event loop.guest_usbdrun passes, andcheck_conventions.pypasses.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository (attach them to this PR)Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-11T18:24:55Z.
Progress report (
a11c8f7→e91ec2b)📈 System libraries: 86.41% (+0.6%, +29 implemented functions)
✅ 29 implemented
sceUsbdAttachKernelDriversceUsbdBulkTransfersceUsbdCheckConnectedsceUsbdClaimInterfacesceUsbdClosesceUsbdControlTransfersceUsbdControlTransferGetDatasceUsbdControlTransferGetSetupsceUsbdFillBulkTransfersceUsbdFillControlSetupsceUsbdFillControlTransfersceUsbdFillIsoTransfersceUsbdGetActiveConfigDescriptorsceUsbdGetBusNumbersceUsbdGetConfigDescriptorsceUsbdGetDeviceAddresssceUsbdGetDeviceDescriptorsceUsbdGetIsoPacketBuffersceUsbdGetStringDescriptorsceUsbdInterruptTransfersceUsbdKernelDriverActivesceUsbdOpensceUsbdRefDevicesceUsbdReleaseInterfacesceUsbdResetDevicesceUsbdSetConfigurationsceUsbdSetIsoPacketLengthssceUsbdSubmitTransfersceUsbdUnrefDeviceImported from boykopovar/AnyPS5. Originally posted by 13hourstilliland on 2026-10-11T19:29:09Z.
The conflict against #1835 is textual only: both PRs append different submodule blocks to the same tail of
.gitmodulesafter thelibjpeg-turboentry (3rdparty/libusb-cmakehere, capstone/pyelftools/ps5link-sdk there), and git cannot auto-merge two different appends at the same anchor. I verified with a trial merge:CMakeLists.txt(theANYPS5_NATIVE_AOToption hunk vs the libusbadd_subdirectoryhunk) anddocs/dev/TechnicalDebt.md(their AOT entries at the top vs this PR's rewrite of the libSceUsbd entry) auto-merge cleanly, and there is no semantic interaction — the AOT path is behind an opt-in flag undercore/aot, the libusb submodule builds unconditionally. Whichever PR merges second just keeps all four submodule blocks in.gitmodules; I will rebase after whichever lands first.Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-12T21:01:41Z.
Review: CHANGES_REQUESTED
#3848 is merged now, but with different commits than the first commit of this branch (
6073ac556): main has98d594c9cplusfaff4a645(cancel under the state lock). The branch no longer merges cleanly:core/libs/prx/libSceUsbd/Export.cpp,core/libs/tests/GuestUsbd.cppanddocs/dev/TechnicalDebt.mdconflict.mainand drop6073ac556, so the PR contains only the transfer-helpers commit and the diff shows only that change.guest_usbdafter the rebase (the merged base changed the cancel path and the test file), and keep the TechnicalDebt line consistent with the version now on main.I'll review the code once the diff is just this commit.
Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-14T02:39:33Z.
Closing: no title is known to reach this. With the queue at 700+ open PRs, please hold off on new PRs that don't name a title needing the change until it's down. If a title stops on this on current main, reopen with the title ID and the log line.
Pull request closed