)]}'
{
  "commit": "cf055c237a93d3308e1670285dfd2b629f0dd8af",
  "tree": "b3631db8eb6b968939cca888372c243b9cbd1478",
  "parents": [
    "fa750d6bf045f1df4314d283dfe0508d0d066559"
  ],
  "author": {
    "name": "Cedric Van den Bergh",
    "email": "cedric.vandenbergh@morsemicro.com",
    "time": "Wed Jul 08 12:47:03 2026 +0100"
  },
  "committer": {
    "name": "Cedric Van den Bergh",
    "email": "cedric.vandenbergh@morsemicro.com",
    "time": "Fri Aug 07 07:42:31 2026 +0100"
  },
  "message": "ncm: fix carrier lost on link-state notify collision\n\ntud_network_link_state() delivered the NETWORK_CONNECTION notification\nedge-triggered and fire-once: if a previous notification was still in\nflight, notification_xmit() returned early and the notification for the\nnew link state was never queued. Because link_is_up is committed before\nthe send, the host could be left reporting a stale carrier state - e.g.\na permanent NO-CARRIER after a link up. The notification state was also\nmutated from both the caller and the notify xfer-completion callback\nwith no serialisation, so on RTOS ports where tud_network_link_state()\nruns in a task other than tud_task() the two could race.\n\nDefer the whole link-state update onto the usbd task, so it can no\nlonger race the completion callback. A collision with an in-flight\nnotification is resolved by re-arming notification_xmit_state and\nletting the existing completion callback drive it forward on the next\nxfer completion, rather than adding a separate pending/retry flag.\n\nA link toggle does not change the link speed, so strictly only the\nNETWORK_CONNECTION notification needs (re)sending, but reusing the\nexisting speed-then-connection state machine keeps the fix on a single,\nalready-serialised code path.\n\nCloses #3760\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "84a524f492493ac9dc8f3c94990f4c2f05fc6e5f",
      "old_mode": 33188,
      "old_path": "src/class/net/ncm_device.c",
      "new_id": "72b592787f2910e8750dde8377e5db1ae0715302",
      "new_mode": 33188,
      "new_path": "src/class/net/ncm_device.c"
    }
  ]
}
