)]}'
{
  "commit": "d4303da15eb28f81c19a239808d2ad0853d01dfe",
  "tree": "84b71fc3974a5c66c4931245f2cf42d376e6d9ae",
  "parents": [
    "b640bd73b91d9acc409e76aad68356f3b2849185"
  ],
  "author": {
    "name": "hathach",
    "email": "thach@tinyusb.org",
    "time": "Sun Jul 12 05:28:49 2026 +0700"
  },
  "committer": {
    "name": "hathach",
    "email": "thach@tinyusb.org",
    "time": "Sun Jul 12 05:28:49 2026 +0700"
  },
  "message": "ch32h417: fix USB3 fallback storm, SET_ADDRESS deref, status-stage completion\n\nApply correctness-review findings on the USBSS SuperSpeed dcd (still pre-hardware):\n\n- Critical: the LINK DISABLE fallback path left TIM12 running, so once the driver\n  switched to USB2 (where the ISR routes to the USB2 handler and never clears the\n  timer flag) the update flag stormed the CPU. Both fallback entry points now go\n  through fallback_to_usb2(), which stops TIM12 first.\n- Critical: dcd_set_address in fallback mode called ch32h417_usb2_edpt0_status_complete\n  with a NULL request (dereferenced immediately) and fell through into the USB3 path.\n  It now arms the USB2 status ZLP and returns; the address is applied by the USB2\n  status-complete callback usbd invokes with the real request.\n- Major: the control STATUS stage (USBSS_UDIF_STATUS) never completed the queued\n  zero-length status transfer, so usbd\u0027s status-stage callback never ran and EP0\n  stayed busy. The status ZLP does not raise a UIF_TRANSFER on this controller, so it\n  is now completed in the UDIF_STATUS branch (and handle_ep0_in no longer completes a\n  zero-length IN early).\n- Also: LINK_STATE_INACTIVE now counts toward the fallback attempt limit (matches the\n  file header and the vendor), the LINK_CFG init uses LINK_TX_DEEMPH_MASK exactly like\n  the WCH EVT literal, and a dead if/else in the EP0-OUT arm path is collapsed.\n\nBuild-verified: both full example matrices (SPEED\u003dsuper and \u003dhigh) build 20/20.\nRemaining review notes (U1/U2/U3 PHY low-power reconfig, RECOVERY case, SET_ISOCH_\nDELAY -\u003e LINK_ISO_DLY, OUT-DMA clamp) are deferred to hardware bring-up.\n\nCo-Authored-By: Claude Opus 4.8 (1M context) \u003cnoreply@anthropic.com\u003e\nClaude-Session: https://claude.ai/code/session_01QWhrtHjbSVMKcY68vxBwBm\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "d355dda7d2f80ced149c2f67addbac916fa32b66",
      "old_mode": 33188,
      "old_path": "src/portable/wch/dcd_ch32h417_usb30.c",
      "new_id": "e79e1e478f510768412348ad39803e1c46a8acc3",
      "new_mode": 33188,
      "new_path": "src/portable/wch/dcd_ch32h417_usb30.c"
    }
  ]
}
