igor.masar
2e8a928ee7
fix(usb_host): Fix return code and description
...
Changed error code from ESP_ERR_INVALID_STATE to ESP_ERR_NOT_FOUND
when the client never opened the device.
Updated function documentation to correctly reflect return values.
2025-03-31 23:44:27 +02:00
Myk Melez
71d098ed63
fix(usb_host): Give semaphore on attempted close of non-opened device
...
If you call *usb_host_device_close()* for a device that isn't open, the function exits early,
without giving back the semaphore it took, which causes any other call that tries to take
that semaphore to hang indefinitely.
Strangely, there's redundant handling of this condition, with two checks in a row that both handle
the case where `_check_client_opened_device(client_obj, dev_addr)` returns `false`:
```c
HOST_CHECK_FROM_CRIT(_check_client_opened_device(client_obj, dev_addr), ESP_ERR_NOT_FOUND);
if (!_check_client_opened_device(client_obj, dev_addr)) {
// Client never opened this device
ret = ESP_ERR_INVALID_STATE;
HOST_EXIT_CRITICAL();
goto exit;
}
…
exit:
xSemaphoreGive(p_host_lib_obj->constant.mux_lock);
return ret;
```
The first line is the one that exits early, as HOST_CHECK_FROM_CRIT returns its second parameter
if its first parameter is false, without giving back the semaphore (although it does exit
the critical section).
The subsequent block handles the exact same case, except that it ensures the semaphore is given
back before returning. Currently, this block is never reached.
Perhaps the first check was added, then someone noticed the issue and added the second check,
but they forgot to remove the first one.
In any case, this PR removes the first check, so the second check can properly handle this case
by giving back the semaphore before returning.
This bug appears to have been present in the initial commit of the USB Host library to the ESP-IDF
repo: accbaee57c
Of course, if you never try to close a non-opened device, then you won't encounter it!
Unfortunately, I have some code that tried to do that, which is how I found the issue.
2025-03-31 23:44:27 +02:00
Mahavir Jain
710ed9bcad
Merge branch 'contrib/github_pr_15291_v5.4' into 'release/v5.4'
...
fix(esp_http_client): Fix invalid content length header (GitHub PR) (v5.4)
See merge request espressif/esp-idf!37540
2025-03-31 21:32:49 +08:00
Mahavir Jain
54283c9567
Merge branch 'feature/add_support_for_ota_resumption' into 'release/v5.4'
...
feat(app_update): Introduced API for managing OTA resumption scenarios (v5.4)
See merge request espressif/esp-idf!37194
2025-03-31 21:32:14 +08:00
Mahavir Jain
a33851c9db
Merge branch 'fix/incorrect_calculation_of_used_xip_pages_v5.4' into 'release/v5.4'
...
fix(esp_psram): Fix incorrect calculation of used XIP PSRAM pages (v5.4)
See merge request espressif/esp-idf!37495
2025-03-31 21:31:59 +08:00
Jiang Jiang Jian
1113c7183d
Merge branch 'doc/add_wakeup_source_usage_precautions_v5.4' into 'release/v5.4'
...
change(doc): added more usage notes & warings about PM_POWER_DOWN_PERIPHERAL_IN_LIGHT_SLEEP (v5.4)
See merge request espressif/esp-idf!37391
2025-03-31 17:33:32 +08:00
Wang Meng Yang
75721348d8
Merge branch 'bugfix/sec_service_record_conn_fail_v5.4' into 'release/v5.4'
...
fix(bt/bluedroid): fix the issue of connection failure when initializing multiple profiles(v5.4)
See merge request espressif/esp-idf!38074
2025-03-31 17:15:22 +08:00
Wang Meng Yang
8f2b6dfe95
Merge branch 'bugfix/fix_esp32_bt_disable_crash_v5.4' into 'release/v5.4'
...
fix(bt): Fix controller disable cause iwdt timeout on esp32 (v5.4)
See merge request espressif/esp-idf!37772
2025-03-31 17:14:52 +08:00
Wang Meng Yang
b1a3813698
Merge branch 'bugfix/fix_hid_reconnect_issue_v5.4' into 'release/v5.4'
...
feat(bt/bluedroid): Add Kconfig option to keep device bonding info when HID unplugging (v5.4)
See merge request espressif/esp-idf!37181
2025-03-31 17:14:40 +08:00
Wang Meng Yang
381379354d
Merge branch 'bugfix/spp_mem_leak_v5.4' into 'release/v5.4'
...
fix(bt/bluedroid): fixed memory leaks in SPP callback mode (v5.4)
See merge request espressif/esp-idf!37385
2025-03-31 17:14:12 +08:00
Wang Meng Yang
b1659a5cd1
Merge branch 'bugfix/spp_free_server_slot_err_v5.4' into 'release/v5.4'
...
fix(bt/bluedroid): Fixed freeing spp server memory when disconnected(v5.4)
See merge request espressif/esp-idf!37608
2025-03-31 17:13:50 +08:00
Wang Meng Yang
d6a436c97a
Merge branch 'bugfix/err_disc_state_changed_evt_v5.4' into 'release/v5.4'
...
fix(bt/bluedroid): fixed other events being reported when disconnected(v5.4)
See merge request espressif/esp-idf!37936
2025-03-31 17:13:48 +08:00
Island
3fbc2b7bce
Merge branch 'feat/optimize_ble_config_reduce_bin_v5.4' into 'release/v5.4'
...
Feat/optimize bluedroid host config and reduce bin size (v5.4)
See merge request espressif/esp-idf!37261
2025-03-31 17:09:50 +08:00
Island
55352b6b62
Merge branch 'bugfix/fix_ble_kconfig_v5.4' into 'release/v5.4'
...
fix(ble/controller): Fix BLE Kconfig on ESP32 to avoid unexpected behavior (v5.4)
See merge request espressif/esp-idf!37422
2025-03-31 17:08:42 +08:00
Island
08d2987db4
Merge branch 'bugfix/fix_ble_report_len_v5.4' into 'release/v5.4'
...
fix(ble/bluedroid): Fix adv data and scan rsp data not reported together in BLE active scan (v5.4)
See merge request espressif/esp-idf!37203
2025-03-31 17:08:30 +08:00
morris
21d470dd26
Merge branch 'fix/i2s_iram_safe_issue_while_use_psram_v5.4' into 'release/v5.4'
...
fix(i2s): fixed failure when dma is iram_safe but i2s not (v5.4)
See merge request espressif/esp-idf!38003
2025-03-31 17:07:43 +08:00
morris
70ab1ccdd0
Merge branch 'bugfix/ppa_srm_scale_frag_yuv420_v5.4' into 'release/v5.4'
...
fix(ppa): fix ppa srm potentially get blocked when scaling to YUV420 (v5.4)
See merge request espressif/esp-idf!37592
2025-03-31 17:05:23 +08:00
morris
8d446396bf
Merge branch 'fix/jpeg_decoder_collective_backport_v5.4' into 'release/v5.4'
...
fix(jpeg_decoder): JPEG Decoder collective backport to v5.4
See merge request espressif/esp-idf!37509
2025-03-31 16:53:25 +08:00
morris
67a6fbc72e
Merge branch 'fix/usb_phy_pull_override_backport_v5.4' into 'release/v5.4'
...
fix(usb_phy): Removed pad pull override config for Full-speed (backport to v5.4)
See merge request espressif/esp-idf!36776
2025-03-31 16:50:37 +08:00
morris
de3964a9c0
Merge branch 'bugfix/adc_oneshot_error_after_continuous_v5.4' into 'release/v5.4'
...
fix(adc): fix adc oneshot error after continuous v5.4
See merge request espressif/esp-idf!37143
2025-03-31 16:47:34 +08:00
morris
c3b4d5a895
Merge branch 'fix/rmt_lim_thres_incorrect_v5.4' into 'release/v5.4'
...
fix(rmt): fix the received symbols issue (v5.4)
See merge request espressif/esp-idf!37899
2025-03-31 16:45:28 +08:00
morris
e29346014f
Merge branch 'feat/add_temperature_calib_v5.4' into 'release/v5.4'
...
feat(temperature_sensor): Add temperature sensor calibration support (backport v5.4)
See merge request espressif/esp-idf!37311
2025-03-31 16:43:31 +08:00
morris
a8e166ec07
Merge branch 'feat/unilc_psram_s3_v5.4' into 'release/v5.4'
...
psram: supported UnilC octal psram on s3 (v5.4)
See merge request espressif/esp-idf!37859
2025-03-31 16:43:01 +08:00
morris
70e8afb9a1
Merge branch 'fix/fix_cam_iram_safe_compile_error_v5.4' into 'release/v5.4'
...
cam: fix cam iram safe compile error (v5.4)
See merge request espressif/esp-idf!37606
2025-03-31 16:42:44 +08:00
morris
2dd1f03b0d
Merge branch 'bugfix/spi_lcd_dc_io_setup_v5.4' into 'release/v5.4'
...
fix(lcd): DC signal shouldn't affect the input path of the GPIO (v5.4)
See merge request espressif/esp-idf!37449
2025-03-31 16:40:17 +08:00
morris
7c7c96e815
Merge branch 'refactor/spi_remove_unnecessary_dependency_v5.4' into 'release/v5.4'
...
fix(spi): removed PERIPH_CTRL_FUNC_IN_IRAM dependency (v5.4)
See merge request espressif/esp-idf!37563
2025-03-31 16:39:13 +08:00
morris
f74b338539
Merge branch 'bugfix/missing_kconfig_definition_v5.4' into 'release/v5.4'
...
fix(i2c): add Kconfig to skip driver conflict check (v5.4)
See merge request espressif/esp-idf!37761
2025-03-31 16:39:04 +08:00
morris
ff74f67de4
Merge branch 'bugfix/usj_wrong_return_value_v5.4' into 'release/v5.4'
...
fix(usb_serial_jtag): wrong return value in usb_serial_jtag_write_bytes (v5.4)
See merge request espressif/esp-idf!37969
2025-03-31 16:38:22 +08:00
morris
2d582fec60
Merge branch 'refactor/gptimer_isr_logs_opt_int_v5.4' into 'release/v5.4'
...
feat(gptimer): make start and stop function idempotent (v5.4)
See merge request espressif/esp-idf!37248
2025-03-31 16:36:46 +08:00
morris
b59ecd5e3d
Merge branch 'feat/enable_l2mem_burst_buffer_mode_v5.4' into 'release/v5.4'
...
improve AXI-ICM QoS function (v5.4)
See merge request espressif/esp-idf!37468
2025-03-31 16:35:49 +08:00
morris
3d650abcba
Merge branch 'feat/can_bypass_buffer_align_check_v5.4' into 'release/v5.4'
...
feat(gdma): allow bypass the alignment check in the link driver (v5.4)
See merge request espressif/esp-idf!37423
2025-03-31 16:21:25 +08:00
xiongweichao
34e6333dd3
fix(bt/bluedroid): fix the issue of connection failure when initializing multiple profiles
...
- Due to the number of service security records exceeding the maximum value, the connection failed
2025-03-28 08:34:00 +08:00
xiongweichao
b48c152ca6
fix(bt/bluedroid): Fixed freeing spp server memory when disconnected
2025-03-28 08:20:01 +08:00
linruihao
e3bb3216df
fix(bt): Fix controller disable cause iwdt timeout on esp32
2025-03-28 08:17:24 +08:00
Xiao Xufeng
4c2820d377
change(version): Update version to 5.4.1
2025-03-27 15:29:07 +08:00
laokaiyao
5bc5fd34d6
fix(i2s): add check for i2s DMA buffer array allocation
...
Closes https://github.com/espressif/esp-idf/issues/15607
2025-03-25 15:23:38 +08:00
laokaiyao
b22964cc4f
fix(i2s): fixed mismatch of the i2s and gdma iram-safe config
...
Closes https://github.com/espressif/esp-idf/issues/15533
2025-03-25 15:17:47 +08:00
zhiweijian
f66322c9b7
feat(bt): fixed some doc error and add ocf parameters description
2025-03-25 14:27:02 +08:00
Shen Weilong
e35dbbbee0
feat(bt): added definitions for bluetooth hci vendor commands and events
2025-03-24 20:28:22 +08:00
Shen Wei Long
da1372d691
feat(ble/controller): Deleted useless functions for ESP32-C2
2025-03-24 20:28:22 +08:00
morris
7164043140
fix(usb_serial_jtag): wrong return value in usb_serial_jtag_write_bytes
...
Closes https://github.com/espressif/esp-idf/issues/15620
2025-03-24 11:46:47 +08:00
Shen Wei Long
6d9c2b9c0f
feat(ble/controller): Deleted useless functions for ESP32-C6/C61/H2/C5
2025-03-21 19:56:59 +08:00
zhiweijian
119048bb75
fix(bt): Update bt lib for ESP32-C3 and ESP32-S3 (d74042a8)
...
- Remove unused functions in the controller
2025-03-21 19:44:30 +08:00
baohongde
57bcbbb449
feat(bt): added definitions for BR/EDR hci vendor commands and events
2025-03-21 19:32:22 +08:00
chenjianhua
bc38724221
fix(bt): Update bt lib for ESP32(dc1cd581)
...
- Remove unused functions in the controller
- Add an SDK config for the minimum size of encryption key
2025-03-21 19:29:32 +08:00
Jiang Jiang Jian
8b80e26f4d
Merge branch 'bugfix/11r_compile_error_v5.4' into 'release/v5.4'
...
fix(wifi): Fixed compilation error when 11KV is disabled and 11R is enabled (v5.4)
See merge request espressif/esp-idf!37865
2025-03-21 17:38:45 +08:00
Jiang Jiang Jian
74eadefb1a
Merge branch 'bugfix/fix_github_cert_verification_simpleota_v5.4' into 'release/v5.4'
...
fix: failing Github certificate verification (v5.4)
See merge request espressif/esp-idf!37824
2025-03-21 16:55:17 +08:00
Jiang Jiang Jian
b1d0ffba15
Merge branch 'feat/add_protocomm_sec_patch_config_v5.4' into 'release/v5.4'
...
feat(protocomm): add (hidden) config option to indicate security patch feature (v5.4)
See merge request espressif/esp-idf!37790
2025-03-21 16:54:50 +08:00
xiongweichao
e74cae7016
fix(bt/bluedroid): fixed other events being reported when disconnected
...
- Since no initial value is assigned, the variable evt is a random value,
causing the ESP_BT_GAP_DISC_STATE_CHANGED_EVT event to be reported when
the connection is disconnected.
2025-03-21 11:11:37 +08:00
Chen Jichang
916af811f4
fix(rmt): fix the received symbols issue
2025-03-20 10:36:45 +08:00