)]}'
{
  "commit": "ca99eb8c2d56bdfff0161388b81e641f4e039b3f",
  "tree": "27aef36da3065ef6e02f11aae34528894619ccfc",
  "parents": [
    "029c3c133ba2c3e0e48fdfacc08324bb3fa2a571"
  ],
  "author": {
    "name": "Trent Piepho",
    "email": "tpiepho@freescale.com",
    "time": "Mon Apr 07 16:04:16 2008 -0700"
  },
  "committer": {
    "name": "Greg Kroah-Hartman",
    "email": "gregkh@suse.de",
    "time": "Sun Apr 20 21:47:09 2008 -0700"
  },
  "message": "PCI: Hotplug: fakephp: Return success, not ENODEV, when bus rescan is triggered\n\nThe \u0027power\u0027 attribute of the fakephp driver originally only let one turn a\nslot off.  If one tried to turn a slot on (echo 1 \u003e .../power), it would\nreturn ENODEV, as fakephp did not support this function.\n\nAn old (pre-git) patch changed this:\n2004/11/11 16:33:31-08:00 jdittmer\n[PATCH] fakephp: add pci bus rescan ability\nhttp://article.gmane.org/gmane.linux.kernel/251183\n\nNow writing \"1\" to the power attribute has the effect of triggering a bus\nrescan, but it still returns ENODEV, probably an oversight in the above\npatch.\n\nUsing the BusyBox echo will not produce an error message, but will\ntrigger *two* bus rescans (and return an exit code of 1):\n~ # strace echo -n 1 \u003e /sys/bus/pci/slots/0000:00:00.0/power\n...\nwrite(1, \"1\", 1)                        \u003d -1 ENODEV (No such device)\nwrite(1, \"1\", 1)                        \u003d -1 ENODEV (No such device)\nexit(1)                                 \u003d ?\n\nUsing cp gives a write error, even though the write did happen and a rescan\nwas triggered:\n~ # echo -n 1 \u003e tmp ; cp tmp /sys/bus/pci/slots/0000:00:00.0/power\ncp: Write Error: No such device\n\nIt seems much better to return success instead of failure.  The actual\nstatus of the bus rescan is hard to return.  It happens asynchronously in a\nwork thread, so the sysfs store functions returns before any status is\nready (the whole point of the work queue).  And even if it didn\u0027t do this,\nthe rescan doesn\u0027t have any clear status to return.\n\nSigned-off-by: Trent Piepho \u003ctpiepho@freescale.com\u003e\nCC: Jan Dittmer \u003cjdittmer@ppp0.net\u003e\nSigned-off-by: Greg Kroah-Hartman \u003cgregkh@suse.de\u003e\n\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "94b640146d4456b4aa0b96b1022f7efcfadbd256",
      "old_mode": 33188,
      "old_path": "drivers/pci/hotplug/fakephp.c",
      "new_id": "e0bbf21928c3219891d98ba7524531fb6527a312",
      "new_mode": 33188,
      "new_path": "drivers/pci/hotplug/fakephp.c"
    }
  ]
}
