)]}'
{
  "commit": "6faf17f6f1ffc586d16efc2f9fa2083a7785ee74",
  "tree": "383d4a10cdc0b02bd8bc3a873613a68a06748cd7",
  "parents": [
    "adda766193ea1cf3137484a9521972d080d0b7af"
  ],
  "author": {
    "name": "Chris Wright",
    "email": "chrisw@sous-sol.org",
    "time": "Fri Aug 28 13:00:06 2009 -0700"
  },
  "committer": {
    "name": "Jesse Barnes",
    "email": "jbarnes@virtuousgeek.org",
    "time": "Sun Aug 30 08:37:25 2009 -0700"
  },
  "message": "PCI SR-IOV: correct broken resource alignment calculations\n\nAn SR-IOV capable device includes an SR-IOV PCIe capability which\ndescribes the Virtual Function (VF) BAR requirements.  A typical SR-IOV\ndevice can support multiple VFs whose BARs must be in a contiguous region,\neffectively an array of VF BARs.  The BAR reports the size requirement\nfor a single VF.  We calculate the full range needed by simply multiplying\nthe VF BAR size with the number of possible VFs and create a resource\nspanning the full range.\n\nThis all seems sane enough except it artificially inflates the alignment\nrequirement for the VF BAR.  The VF BAR need only be aligned to the size\nof a single BAR not the contiguous range of VF BARs.  This can cause us\nto fail to allocate resources for the BAR despite the fact that we\nactually have enough space.\n\nThis patch adds a thin PCI specific layer over the generic\nresource_alignment() function which is aware of the special nature of\nVF BARs and does sorting and allocation based on the smaller alignment\nrequirement.\n\nI recognize that while resource_alignment is generic, it\u0027s basically a\nPCI helper.  An alternative to this patch is to add PCI VF BAR specific\ninformation to struct resource.  I opted for the extra layer rather than\nadding such PCI specific information to struct resource.  This does\nhave the slight downside that we don\u0027t cache the BAR size and re-read\nfor each alignment query (happens a small handful of times during boot\nfor each VF BAR).\n\nSigned-off-by: Chris Wright \u003cchrisw@sous-sol.org\u003e\nCc: Ivan Kokshaysky \u003cink@jurassic.park.msu.ru\u003e\nCc: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\nCc: Matthew Wilcox \u003cmatthew@wil.cx\u003e\nCc: Yu Zhao \u003cyu.zhao@intel.com\u003e\nCc: stable@kernel.org\nSigned-off-by: Jesse Barnes \u003cjbarnes@virtuousgeek.org\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "e3a87210e947cdce8d57ded76c63cfb2ba07e788",
      "old_mode": 33188,
      "old_path": "drivers/pci/iov.c",
      "new_id": "e03fe98f06193c1c6a1fa22cbf6db92a0dbd2c6a",
      "new_mode": 33188,
      "new_path": "drivers/pci/iov.c"
    },
    {
      "type": "modify",
      "old_id": "f73bcbedf37c492344d92bed0ef5840db33ecbcc",
      "old_mode": 33188,
      "old_path": "drivers/pci/pci.h",
      "new_id": "5ff4d25bf0e938f28904f22b46b5c6505239af8e",
      "new_mode": 33188,
      "new_path": "drivers/pci/pci.h"
    },
    {
      "type": "modify",
      "old_id": "b636e245445defa08b1b7a03d38d204388d6b717",
      "old_mode": 33188,
      "old_path": "drivers/pci/setup-bus.c",
      "new_id": "7c443b4583ab67162dd97718636cb30cfbc93b8f",
      "new_mode": 33188,
      "new_path": "drivers/pci/setup-bus.c"
    },
    {
      "type": "modify",
      "old_id": "1898c7b47907b81cb456d8a06391f47dc4b7f4d7",
      "old_mode": 33188,
      "old_path": "drivers/pci/setup-res.c",
      "new_id": "88cdd1a937d6bd3a91180690d9f4e60df92201f8",
      "new_mode": 33188,
      "new_path": "drivers/pci/setup-res.c"
    }
  ]
}
