)]}'
{
  "commit": "0659cf9dcd148f6771c056fa95976fda9c5abf9d",
  "tree": "4f6cc56b2e5a4ca1ada1320a9961e6a86805de58",
  "parents": [
    "b62d32b9166b085a487916eca514b59b5ffdf2b7"
  ],
  "author": {
    "name": "Alan Stern",
    "email": "stern@rowland.harvard.edu",
    "time": "Mon Jul 09 11:09:21 2012 -0400"
  },
  "committer": {
    "name": "Greg Kroah-Hartman",
    "email": "gregkh@linuxfoundation.org",
    "time": "Mon Jul 16 09:04:39 2012 -0700"
  },
  "message": "PCI: EHCI: fix crash during suspend on ASUS computers\n\ncommit dbf0e4c7257f8d684ec1a3c919853464293de66e upstream.\n\nQuite a few ASUS computers experience a nasty problem, related to the\nEHCI controllers, when going into system suspend.  It was observed\nthat the problem didn\u0027t occur if the controllers were not put into the\nD3 power state before starting the suspend, and commit\n151b61284776be2d6f02d48c23c3625678960b97 (USB: EHCI: fix crash during\nsuspend on ASUS computers) was created to do this.\n\nIt turned out this approach messed up other computers that didn\u0027t have\nthe problem -- it prevented USB wakeup from working.  Consequently\ncommit c2fb8a3fa25513de8fedb38509b1f15a5bbee47b (USB: add\nNO_D3_DURING_SLEEP flag and revert 151b61284776be2) was merged; it\nreverted the earlier commit and added a whitelist of known good board\nnames.\n\nNow we know the actual cause of the problem.  Thanks to AceLan Kao for\ntracking it down.\n\nAccording to him, an engineer at ASUS explained that some of their\nBIOSes contain a bug that was added in an attempt to work around a\nproblem in early versions of Windows.  When the computer goes into S3\nsuspend, the BIOS tries to verify that the EHCI controllers were first\nquiesced by the OS.  Nothing\u0027s wrong with this, but the BIOS does it\nby checking that the PCI COMMAND registers contain 0 without checking\nthe controllers\u0027 power state.  If the register isn\u0027t 0, the BIOS\nassumes the controller needs to be quiesced and tries to do so.  This\ninvolves making various MMIO accesses to the controller, which don\u0027t\nwork very well if the controller is already in D3.  The end result is\na system hang or memory corruption.\n\nSince the value in the PCI COMMAND register doesn\u0027t matter once the\ncontroller has been suspended, and since the value will be restored\nanyway when the controller is resumed, we can work around the BIOS bug\nsimply by setting the register to 0 during system suspend.  This patch\n(as1590) does so and also reverts the second commit mentioned above,\nwhich is now unnecessary.\n\nIn theory we could do this for every PCI device.  However to avoid\nintroducing new problems, the patch restricts itself to EHCI host\ncontrollers.\n\nFinally the affected systems can suspend with USB wakeup working\nproperly.\n\nReference: https://bugzilla.kernel.org/show_bug.cgi?id\u003d37632\nReference: https://bugzilla.kernel.org/show_bug.cgi?id\u003d42728\nBased-on-patch-by: AceLan Kao \u003cacelan.kao@canonical.com\u003e\nSigned-off-by: Alan Stern \u003cstern@rowland.harvard.edu\u003e\nTested-by: Dâniel Fraga \u003cfragabr@gmail.com\u003e\nTested-by: Javier Marcet \u003cjmarcet@gmail.com\u003e\nTested-by: Andrey Rahmatullin \u003cwrar@wrar.name\u003e\nTested-by: Oleksij Rempel \u003cbug-track@fisher-privat.net\u003e\nTested-by: Pavel Pisa \u003cpisa@cmp.felk.cvut.cz\u003e\nAcked-by: Bjorn Helgaas \u003cbhelgaas@google.com\u003e\nAcked-by: Rafael J. Wysocki \u003crjw@sisk.pl\u003e\nSigned-off-by: Greg Kroah-Hartman \u003cgregkh@linuxfoundation.org\u003e\n\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "6b54b23b990be0be03dddb49f5e02b55e5272c56",
      "old_mode": 33188,
      "old_path": "drivers/pci/pci-driver.c",
      "new_id": "3cd3f452813302b4e98e551518546eeacb19c304",
      "new_mode": 33188,
      "new_path": "drivers/pci/pci-driver.c"
    },
    {
      "type": "modify",
      "old_id": "f597a1aa5e69c981794262fab68959eea6420ca1",
      "old_mode": 33188,
      "old_path": "drivers/pci/pci.c",
      "new_id": "111569ccab434dda8262e1ddeb3a9aab04043171",
      "new_mode": 33188,
      "new_path": "drivers/pci/pci.c"
    },
    {
      "type": "modify",
      "old_id": "bf33f0b7f95706bcd249290e53920ebd3c0b5019",
      "old_mode": 33188,
      "old_path": "drivers/pci/quirks.c",
      "new_id": "4bf71028556b995bd48c0ea9caec081445fa4234",
      "new_mode": 33188,
      "new_path": "drivers/pci/quirks.c"
    },
    {
      "type": "modify",
      "old_id": "8b2921ad51a9516caa9edd7d58ed5f692625841c",
      "old_mode": 33188,
      "old_path": "include/linux/pci.h",
      "new_id": "e444f5b491188566b8a7107182fd24584d92fea2",
      "new_mode": 33188,
      "new_path": "include/linux/pci.h"
    }
  ]
}
