summaryrefslogtreecommitdiff
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-07Merge pull request #3187 from s09289728096/fix_dhcpHa Thach
dhcp: Fix DHCP_OFFER/DHCP_ACK destinaton.
2025-08-05Merge pull request #3203 from hathach/fix-rp2-audio-iso-transferHa Thach
fix rp2 iso transfer with new audio driver
2025-08-05Merge pull request #3200 from peppapighs/at32f405-usb-hsHa Thach
Fix AT32F405xx missing USB HS definition
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-05Merge pull request #3197 from hathach/fix-audio-typoHa Thach
fix tud_audio_set_itf_close_EP_cb() typo
2025-08-02fix tud_audio_set_itf_close_EP_cb() typohathach
2025-08-02Merge pull request #3091 from raldone01/fix/web_serialHa Thach
Rewrite of the web_serial example website.
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-02Merge pull request #3195 from hathach/update-inquiry2Ha Thach
add bufsize to tud_msc_inquiry2_cb()
2025-08-01Update examples/device/msc_dual_lun/src/msc_disk_dual.cHa Thach
Co-authored-by: Copilot <[email protected]>
2025-08-01Merge pull request #3194 from hathach/at32-docHa Thach
update doc for at32
2025-08-01add bufsize to tud_msc_inquiry2_cb()hathach
2025-08-01add at32 to README.rst, rename at32 board to lower case, correct name to ↵hathach
match mcu, add meta data
2025-08-01Merge pull request #3191 from hathach/at32Ha Thach
support at32 mcu (2)
2025-07-31clean uphathach
2025-07-31add ci build for all at32, use linker and startup from mcu cmsis instead of ↵hathach
local files
2025-07-29Add reconnect mraldone01
2025-07-29add ci build for at32: f402_405, f403a_407, f423hathach
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-28Merge pull request #3186 from rhgndf/nanoch32v305Ha Thach
Add nanoch32v305
2025-07-28correct flash/ram for v307 and v305hathach
2025-07-27Fix goto indentationElwin Huang
Co-authored-by: Copilot <[email protected]>
2025-07-27Fix CIJie Feng
2025-07-27Fix gpio clockJie Feng
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-26More catches.raldone01
2025-07-25Fix compile error.Elwin Huang
2025-07-25dhcp: Fix DHCP_OFFER/DHCP_ACK destinaton.EcuasYos
In RFC 2131, the destination of DHCP OFFER/ACK is defined in Section 4.1. Fix the destination error by following the rule of RFC 2131. TODO: We implement all rule but the last one. ARP table is required to associate client's macaddr. Currently, fallback to broadcast. Signed-off-by: Elwin Huang <[email protected]>
2025-07-24Improve web usb and web serial robustness.raldone01
2025-07-24Add nanoch32v305Jie Feng
2025-07-24Merge pull request #3182 from HiFiPhile/h7_fixHa Thach
bsp/h7rs: fix a typo
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-22Merge pull request #3179 from rhgndf/add_ch32v305Zixun LI
Report CH32V305 as working
2025-07-20fix typoHiFiPhile
Signed-off-by: HiFiPhile <[email protected]>
2025-07-18Report CH32V305 as workingJie Feng
2025-07-16Merge pull request #3175 from elipsitz/masterHa Thach
Fix compilation when CH34X support is disabled
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-11Mitigate potential xss.raldone01