{
  "id": "embedded/usb-hcd-queue-stall",
  "signature": "USB: HCD queue stall on endpoint 0x81, transfer not progressing",
  "signature_zh": "USB：主机控制器驱动队列在端点0x81上停滞，传输无法继续",
  "regex": "USB: HCD queue stall on endpoint",
  "domain": "embedded",
  "category": "protocol_error",
  "subcategory": null,
  "root_cause": "USB host controller driver (HCD) encountered a STALL handshake from the device on a bulk or control endpoint, and the driver did not clear the stall condition, causing the transfer queue to hang.",
  "root_cause_type": "generic",
  "root_cause_zh": "USB主机控制器驱动在批量或控制端点上收到了设备的STALL握手信号，但驱动未清除该停滞状态，导致传输队列挂起。",
  "versions": [],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Resetting the entire USB bus without clearing the endpoint stall causes the device to re-enter the same stall state immediately.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Increasing the USB transfer timeout does not resolve the stall; the device will remain stalled indefinitely.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Send a CLEAR_FEATURE control request to the stalled endpoint. Example using STM32 HAL: HCD_EP_ClrStall(&hhcd, ep_addr); where ep_addr is the endpoint address (e.g., 0x81).",
      "success_rate": 0.85,
      "how": "Send a CLEAR_FEATURE control request to the stalled endpoint. Example using STM32 HAL: HCD_EP_ClrStall(&hhcd, ep_addr); where ep_addr is the endpoint address (e.g., 0x81).",
      "condition": "",
      "sources": []
    },
    {
      "action": "Implement a recovery state machine in the USB class driver that detects stall events and automatically re-enqueues the transfer after clearing the halt.",
      "success_rate": 0.8,
      "how": "Implement a recovery state machine in the USB class driver that detects stall events and automatically re-enqueues the transfer after clearing the halt.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "Send a CLEAR_FEATURE control request to the stalled endpoint. Example using STM32 HAL: HCD_EP_ClrStall(&hhcd, ep_addr); where ep_addr is the endpoint address (e.g., 0x81).",
    "Implement a recovery state machine in the USB class driver that detects stall events and automatically re-enqueues the transfer after clearing the halt."
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://www.usb.org/document-library/usb-20-specification",
  "official_doc_section": null,
  "error_code": "HCD_ERR_STALL",
  "verification_tier": "ai_generated",
  "confidence": 0.88,
  "fix_success_rate": 0.78,
  "resolvable": "true",
  "first_seen": "2023-11-20",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}