summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2025-09-13ohci: Use uncached alias to access EDsR
This code is written very carefully to always use an uncached view of memory to read/write EDs. An uncached view must *always* be used, or else cache behavior can corrupt the ED. As part of this change, combine access into as few word-sized accesses as possible. This makes the code perform better. Doing this involves giving type names to the bitfields that make up the ED's data words.
2025-09-13ohci: Perform explicit cache operations on TDs, buffersR
2025-09-13ohci: Re-implement TD allocation, matching the specificationR
The initial motivation for doing this is to remove the `used` flag in the TD. If we use this flag, we end up being required to read from TDs that the OHCI controller might be modifying (i.e. the OHCI controller logically owns the TD). This happens when we try to allocate a new, empty TD while the OHCI host controller is working on a transfer. Move the `used` flag to `gtd_extra_data_t`. This data is only used by the CPU, and the OHCI controller never accesses it. The existing allocation method for TDs does *not* put an empty TD onto each ED (i.e it does *not* do what is shown in Figure 5-6 of the OHCI specification). Instead, the NextTD field of the last TD is set to 0. The TailP field of the ED is also set to 0. This works in many cases. However, this implementation means that the CPU may end up trying to write to the NextTD field of an in-progress transfer while the OHCI host controller logically owns it. Change the implementation to use an empty TD, as suggested by the specification, for endpoints other than EP0. This avoids the above issue. It is not necessary to make the change for EP0 because only at most one TD can ever be pending at a time. The above change should also remove the need for the stall workaround. In the future, we want to modify the code to access EDs through an uncached mapping. Because uncached mappings are slow, we want to access EDs as little as possible. Currently, when a TD completes, we access an ED in order to figure out the device address and endpoint number of the TD which was completed. Because moving `used` to `gtd_extra_data_t` necessitates expanding it, we have enough room to also store the device address and endpoint number of the TD. This patch does so. With the above two changes, we no longer need to access an ED when a TD completes. Also remove the `index` field from TDs as it is no longer necessary.
2025-09-12ohci: Align TDs to cache linesR
2025-09-12ohci: Add functions used for explicit cache operationsR
2025-08-05Merge pull request #3203 from hathach/fix-rp2-audio-iso-transferHa Thach
fix rp2 iso transfer with new audio driver
2025-08-05fix rp2 iso transfer: reset state before notify stack. since new audio ↵hathach
driver can execute xfer_is()
2025-08-05Fix AT32F405xx missing USB HS definitionpeppapighs
2025-08-02fix tud_audio_set_itf_close_EP_cb() typohathach
2025-08-02Merge pull request #3183 from rppicomidi/fix_3159Ha Thach
Fix #3159: Handle MIDI interface after audio streaming interface
2025-08-02use tu_desc_in_bounds() for descriptor loophathach
2025-08-01add bufsize to tud_msc_inquiry2_cb()hathach
2025-08-01Merge pull request #3191 from hathach/at32Ha Thach
support at32 mcu (2)
2025-07-31clean uphathach
2025-07-28fix pre-commit, remove svd file since they are heavy and should be in ↵hathach
mcu/sdk instead add cmake support for f403a_407 and f423
2025-07-26Merge pull request #3173 from HiFiPhile/feature/usbtmc_vendor-specificHa Thach
feature(usbtmc): add support for usbtmc vendor-spicific command messages
2025-07-26Update src/class/usbtmc/usbtmc_device.cHa Thach
Co-authored-by: Copilot <[email protected]>
2025-07-23Restore accidentally erased debug log messagerppicomidi
2025-07-23Delete debugging printfrppicomidi
2025-07-23Fix #3159: Handle MIDI interface descriptor after audio streaming interfacerppicomidi
2025-07-15Fix compilation when CH34X support is disabledEli Lipsitz
2025-07-11fix last transfer sizeZixun LI
Co-authored-by: Copilot <[email protected]>
2025-07-11typo fixZixun LI
Co-authored-by: Copilot <[email protected]>
2025-07-11Merge branch 'master' into feature/usbtmc_vendor-specificHiFiPhile
2025-07-11Merge pull request #3172 from hathach/msc-inquiry2-cbHa Thach
add tud_msc_inquiry2_cb() for full inquiry response
2025-07-11Merge pull request #3168 from hathach/feature/add_tusb_teardownHa Thach
Feature/add tusb teardown
2025-07-11add tud_msc_inquiry2_cb() for full inquiry responsehathach
2025-07-10Merge pull request #2987 from hathach/fix-2923-altHa Thach
make sure TOTAL_DRIVER_COUNT is not overflow 8-bit
2025-07-10rename to tusb_deinit() to match other namingghathach
2025-07-10Merge branch 'master' into fork/roma-jam/feature/add_tusb_teardownhathach
2025-07-10FIx recurrent suspend ISR.HiFiPhile
2025-07-09add board_vbus_set() for samd21/d51 to enable usb host vbushathach
enable host example build for samd21/d51
2025-07-09Merge branch 'refs/heads/master' into fork/ChrisDeadman/hcd-samd-supporthathach
2025-07-09Merge pull request #3165 from hathach/codex/find-and-fix-a-codebase-bugHa Thach
Fix HID descriptor parsing of 4‑byte items
2025-07-09Add spec reference for 4-byte HID item sizeHa Thach
2025-07-09fix HID parser variable size handlingHa Thach
2025-07-08revert edpt busy/claim status if xfer_isr() defer to xfer_cb()hathach
2025-07-08minor reformat codehathach
2025-07-08Merge remote-tracking branch 'origin/master' into xfer_isrhathach
# Conflicts: # examples/device/audio_4_channel_mic_freertos/src/main.c # examples/device/audio_test_freertos/src/main.c # src/class/audio/audio_device.c
2025-07-08Fix HID descriptor parser size handlingHa Thach
2025-07-07Merge pull request #2963 from HiFiPhile/stm32_cacheHa Thach
Add DWC2 cache maintenance routines for STM32
2025-07-07change CFG_TUSB_MEM_DCACHE_LINE_SIZE_DEFAULT (not defined) to 1hathach
use stock iar linker
2025-07-07updateYixingShen
2025-07-07support at32 mcuzhiqiang
2025-07-07fixed CFG_TUD_VENDOR > 1 vendord_open tud_vendor_n_write_flushYixingShen
tud_vendor_n_write_flush argument should be 0,1,2,..., but p_vendor - _vendord_itf is 0, sizeof(vendord_interface_t), 2*sizeof(vendord_interface_t), ...
2025-07-05Use DMA enable for DCache conditionHiFiPhile
Signed-off-by: HiFiPhile <[email protected]>
2025-07-05always define CFG_TUH_WCH_USBIP_USBFS=1 for ch32v20x since only port1 ↵hathach
support host mode reformat hcd usbfs add uart rx for ch32v20x bsp
2025-07-04Merge branch 'refs/heads/master' into fork/verylowfreq/pr-ch32v-usbfs-hosthathach
2025-07-03Merge branch 'master' into fork/HiFiPhile/stm32_cachehathach
2025-07-03reduce bInterval for default CDC descriptor from 16ms to 1mshathach