)]}'
{
  "commit": "3f0479e00a3fca9590ae8d9edc4e9c47b7fa0610",
  "tree": "495cee9f35ed0315367a10af86bbb107f05eeb75",
  "parents": [
    "91017f9cf5fcfb601b8d583c896ac7de7d200c57"
  ],
  "author": {
    "name": "Sarah Sharp",
    "email": "sarah.a.sharp@linux.intel.com",
    "time": "Thu Dec 03 09:44:36 2009 -0800"
  },
  "committer": {
    "name": "Greg Kroah-Hartman",
    "email": "gregkh@suse.de",
    "time": "Fri Dec 11 11:55:27 2009 -0800"
  },
  "message": "USB: Check bandwidth when switching alt settings.\n\nMake the USB core check the bandwidth when switching from one\ninterface alternate setting to another.  Also check the bandwidth\nwhen resetting a configuration (so that alt setting 0 is used).  If\nthis check fails, the device\u0027s state is unchanged.  If the device\nrefuses the new alt setting, re-instate the old alt setting in the\nhost controller hardware.\n\nIf a USB device doesn\u0027t have an alternate interface setting 0, install\nthe first alt setting in its descriptors when a new configuration is\nrequested, or the device is reset.\n\nAdd a mutex per root hub to protect bandwidth operations:\nadding/reseting/changing configurations, and changing alternate interface\nsettings.  We want to ensure that the xHCI host controller and the USB\ndevice are set up for the same configurations and alternate settings.\nThere are two (possibly three) steps to do this:\n\n 1. The host controller needs to check that bandwidth is available for a\n    different setting, by issuing and waiting for a configure endpoint\n    command.\n 2. Once that returns successfully, a control message is sent to the\n    device.\n 3. If that fails, the host controller must be notified through another\n    configure endpoint command.\n\nThe mutex is used to make these three operations seem atomic, to prevent\nanother driver from using more bandwidth for a different device while\nwe\u0027re in the middle of these operations.\n\nWhile we\u0027re touching the bandwidth code, rename usb_hcd_check_bandwidth()\nto usb_hcd_alloc_bandwidth().  This function does more than just check\nthat the bandwidth change won\u0027t exceed the bus bandwidth; it actually\nchanges the bandwidth configuration in the xHCI host controller.\n\nSigned-off-by: Sarah Sharp \u003csarah.a.sharp@linux.intel.com\u003e\nSigned-off-by: Greg Kroah-Hartman \u003cgregkh@suse.de\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "fc235b02ff2795e210c7210aae9418fbd1976233",
      "old_mode": 33188,
      "old_path": "drivers/usb/core/hcd.c",
      "new_id": "6dac3b802d41b5cbc1631b20ecf3cd7a72588385",
      "new_mode": 33188,
      "new_path": "drivers/usb/core/hcd.c"
    },
    {
      "type": "modify",
      "old_id": "79782a1c43f6098d98ac008bb5591b8607911ca1",
      "old_mode": 33188,
      "old_path": "drivers/usb/core/hcd.h",
      "new_id": "d8b43aee581e2d3c463efafcb396f9b8dd86a5e5",
      "new_mode": 33188,
      "new_path": "drivers/usb/core/hcd.h"
    },
    {
      "type": "modify",
      "old_id": "b38fd6730e2aefde1456d5b8578237bee7d7db13",
      "old_mode": 33188,
      "old_path": "drivers/usb/core/hub.c",
      "new_id": "e4b0e28f7453e0bd2968fd740a3a0567854e700b",
      "new_mode": 33188,
      "new_path": "drivers/usb/core/hub.c"
    },
    {
      "type": "modify",
      "old_id": "adb9c8ee0c1f096f67e7f3ca5faf2ba423c27abb",
      "old_mode": 33188,
      "old_path": "drivers/usb/core/message.c",
      "new_id": "ed83f2b1d551ec529e7e4ff27129bf2d1389d5d1",
      "new_mode": 33188,
      "new_path": "drivers/usb/core/message.c"
    }
  ]
}
