)]}'
{
  "commit": "11058bd3d47d57eb3473935feae53868d6d168b7",
  "tree": "f395541a8607eb8a97660e32206ca4b7be498539",
  "parents": [
    "133c71b2c0bc976a4751f9e05ef7cdea67f964e5"
  ],
  "author": {
    "name": "Jasper Wise",
    "email": "jaspwise@amazon.co.uk",
    "time": "Thu Aug 13 08:46:18 2026 +0000"
  },
  "committer": {
    "name": "Mark Brown",
    "email": "broonie@kernel.org",
    "time": "Thu Aug 13 17:34:01 2026 +0100"
  },
  "message": "spi: virtio: mark device ready before registering the controller\n\nvirtio_spi_probe() registers the SPI controller with\ndevm_spi_register_controller(). spi_register_controller() binds a child\ninline unless its driver has asked for asynchronous probing, so a\nperipheral that performs a transfer during its own probe reaches\nvirtio_spi_transfer_one(), which kicks the virtqueue before probe has\nreturned.\n\nThe driver never calls virtio_device_ready(), so DRIVER_OK is set on its\nbehalf by virtio_dev_probe(), only once probe has returned. The virtio\nspec is explicit about that ordering in 3.1 Device Initialization:\n  |  The driver MUST NOT send any buffer available notifications to the\n  |  device before setting DRIVER_OK.\n\nA device that waits for DRIVER_OK before servicing the queue therefore\nleaves the transfer unanswered, and virtio_spi_transfer_one() waits for its\ncompletion with no timeout, so probe never returns.\n\nMark the device ready before registering the controller, as done for the\nsame reason in commit f5866db64f34 (\"virtio_console: enable VQs early\") and\ncommit 1d774589f924 (\"i2c: virtio: mark device ready before registering the\nadapter\").\n\nFixes: f98cabe3f6cf (\"SPI: Add virtio SPI driver\")\nSigned-off-by: Jasper Wise \u003cjaspwise@amazon.co.uk\u003e\nLink: https://patch.msgid.link/20260813084618.613172-1-jaspwise@amazon.co.uk\nSigned-off-by: Mark Brown \u003cbroonie@kernel.org\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "fa4c68049eca41b9c00d9791692392c5c3ab2ba8",
      "old_mode": 33188,
      "old_path": "drivers/spi/spi-virtio.c",
      "new_id": "2256dfec5407da86b2dabf26099444a1e1d4f70f",
      "new_mode": 33188,
      "new_path": "drivers/spi/spi-virtio.c"
    }
  ]
}
