fix(usb/host): Do not call heap_caps_get_allocated_size() in USB host driver

It causes heap corruption if heap poisoning is enabled on ESP32-P4.
It returns incorrect size on ESP32-S3.

Closes https://github.com/espressif/esp-idf/issues/15815
This commit is contained in:
Tomas Rezucha
2025-04-23 08:42:17 +02:00
committed by BOT
parent 8344af1f09
commit 6badd2cf25
6 changed files with 47 additions and 21 deletions
+2 -1
View File
@@ -77,7 +77,8 @@ typedef bool (*usb_proc_req_cb_t)(usb_proc_req_source_t source, bool in_isr, voi
*
* - Data buffer is allocated in DMA capable memory
* - The constant fields of the URB are also set
* - The data_buffer field of the URB is set to point to start of the allocated data buffer.
* - The data_buffer field of the URB is set to point to start of the allocated data buffer
* - The resulting data_buffer_size can be bigger that the requested size. This is to ensure that the data buffer is cache aligned
*
* @param[in] data_buffer_size Size of the URB's data buffer
* @param[in] num_isoc_packets Number of isochronous packet descriptors