)]}'
{
  "commit": "bc4f24014de58f045f169742701a6598884d93db",
  "tree": "4e68ae6fa5fff179ce69b2d890b01a5fcc9c55d5",
  "parents": [
    "db5bd1e0b505c54ff492172ce4abc245cf6cd639"
  ],
  "author": {
    "name": "Alan Stern",
    "email": "stern@rowland.harvard.edu",
    "time": "Thu Jun 17 10:41:42 2010 -0400"
  },
  "committer": {
    "name": "James Bottomley",
    "email": "James.Bottomley@suse.de",
    "time": "Wed Jul 28 09:07:50 2010 -0500"
  },
  "message": "[SCSI] implement runtime Power Management\n\nThis patch (as1398b) adds runtime PM support to the SCSI layer.  Only\nthe machanism is provided; use of it is up to the various high-level\ndrivers, and the patch doesn\u0027t change any of them.  Except for sg --\nthe patch expicitly prevents a device from being runtime-suspended\nwhile its sg device file is open.\n\nThe implementation is simplistic.  In general, hosts and targets are\nautomatically suspended when all their children are asleep, but for\nthem the runtime-suspend code doesn\u0027t actually do anything.  (A host\u0027s\nruntime PM status is propagated up the device tree, though, so a\nruntime-PM-aware lower-level driver could power down the host adapter\nhardware at the appropriate times.)  There are comments indicating\nwhere a transport class might be notified or some other hooks added.\n\nLUNs are runtime-suspended by calling the drivers\u0027 existing suspend\nhandlers (and likewise for runtime-resume).  Somewhat arbitrarily, the\nimplementation delays for 100 ms before suspending an eligible LUN.\nThis is because there typically are occasions during bootup when the\nsame device file is opened and closed several times in quick\nsuccession.\n\nThe way this all works is that the SCSI core increments a device\u0027s\nPM-usage count when it is registered.  If a high-level driver does\nnothing then the device will not be eligible for runtime-suspend\nbecause of the elevated usage count.  If a high-level driver wants to\nuse runtime PM then it can call scsi_autopm_put_device() in its probe\nroutine to decrement the usage count and scsi_autopm_get_device() in\nits remove routine to restore the original count.\n\nHosts, targets, and LUNs are not suspended while they are being probed\nor removed, or while the error handler is running.  In fact, a fairly\nlarge part of the patch consists of code to make sure that things\naren\u0027t suspended at such times.\n\n[jejb: fix up compile issues in PM config variations]\nSigned-off-by: Alan Stern \u003cstern@rowland.harvard.edu\u003e\nSigned-off-by: James Bottomley \u003cJames.Bottomley@suse.de\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "a2b1414da288feb1b2085c9848d7e4fe64432eb2",
      "old_mode": 33188,
      "old_path": "drivers/scsi/hosts.c",
      "new_id": "8a8f803439e18cc2d267271adc3087e53fd619b6",
      "new_mode": 33188,
      "new_path": "drivers/scsi/hosts.c"
    },
    {
      "type": "modify",
      "old_id": "c60cffbefa3c4a0a7218ba801c992567db74a962",
      "old_mode": 33188,
      "old_path": "drivers/scsi/scsi_error.c",
      "new_id": "2bf98469dc4c6df096def2338de1670a72605ba0",
      "new_mode": 33188,
      "new_path": "drivers/scsi/scsi_error.c"
    },
    {
      "type": "modify",
      "old_id": "cd83758ce0a2695ab62669d6379b1248ec59230a",
      "old_mode": 33188,
      "old_path": "drivers/scsi/scsi_pm.c",
      "new_id": "d70e91ae60af199d8e64a027fa4382026e553f90",
      "new_mode": 33188,
      "new_path": "drivers/scsi/scsi_pm.c"
    },
    {
      "type": "modify",
      "old_id": "dddacc7325502fd24e12bc1de7209d6910adb101",
      "old_mode": 33188,
      "old_path": "drivers/scsi/scsi_priv.h",
      "new_id": "026295e2c53959adcb6fb1abbbb047b9dc75095a",
      "new_mode": 33188,
      "new_path": "drivers/scsi/scsi_priv.h"
    },
    {
      "type": "modify",
      "old_id": "1c027a97d8b9ea570d0a48d254908a71cfe84377",
      "old_mode": 33188,
      "old_path": "drivers/scsi/scsi_scan.c",
      "new_id": "3d0a1e6e9c489cb79647c54e28865e79cc733d4c",
      "new_mode": 33188,
      "new_path": "drivers/scsi/scsi_scan.c"
    },
    {
      "type": "modify",
      "old_id": "5f85f8e831f30c710809c197ad67b7409e8bc1b5",
      "old_mode": 33188,
      "old_path": "drivers/scsi/scsi_sysfs.c",
      "new_id": "562fb3bce2611b2366603c723a2ae7192d0ad9f4",
      "new_mode": 33188,
      "new_path": "drivers/scsi/scsi_sysfs.c"
    },
    {
      "type": "modify",
      "old_id": "d4549092400ce3328d29df047238b0a057f182d2",
      "old_mode": 33188,
      "old_path": "drivers/scsi/sg.c",
      "new_id": "2968c6b83ddba4cf34a5a2019b025f521c5683d7",
      "new_mode": 33188,
      "new_path": "drivers/scsi/sg.c"
    },
    {
      "type": "modify",
      "old_id": "d80b6dbed1cac2a34c2cf7655590cd1473a9e378",
      "old_mode": 33188,
      "old_path": "include/scsi/scsi_device.h",
      "new_id": "50cb34ffef11e22a3aff83f279aacd4d67dfe0bc",
      "new_mode": 33188,
      "new_path": "include/scsi/scsi_device.h"
    }
  ]
}
