From ec71669bff4f645b968793fa683e411cb7aae253 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Sat, 11 Oct 2025 06:24:35 -1000 Subject: [PATCH] tweak comments --- esphome/components/usb_host/usb_host_client.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/esphome/components/usb_host/usb_host_client.cpp b/esphome/components/usb_host/usb_host_client.cpp index 5c8874861e..91d7af2898 100644 --- a/esphome/components/usb_host/usb_host_client.cpp +++ b/esphome/components/usb_host/usb_host_client.cpp @@ -428,8 +428,8 @@ static void transfer_callback(usb_transfer_t *xfer) { trq->callback(trq->status); } - // Release transfer slot immediately in USB task to prevent slot exhaustion - // This is critical for high-throughput transfers (e.g., USB UART at 115200 baud) + // Release transfer slot AFTER callback completes to prevent slot exhaustion + // The callback has finished accessing xfer->data_buffer, so it's safe to release // The release_trq() uses thread-safe atomic operations trq->client->release_trq(trq); }