)]}'
{
  "commit": "bc677d5b64644c399cd3db6a905453e611f402ab",
  "tree": "d973a02c33f0e0d407e9ec7c6054220e15d5c72f",
  "parents": [
    "8ad028bd973ec1ead4982e21ab0400c956aff4b5"
  ],
  "author": {
    "name": "Clemens Ladisch",
    "email": "clemens@ladisch.de",
    "time": "Sat Dec 03 23:41:31 2011 +0100"
  },
  "committer": {
    "name": "Greg Kroah-Hartman",
    "email": "gregkh@suse.de",
    "time": "Fri Dec 09 16:18:19 2011 -0800"
  },
  "message": "usb: fix number of mapped SG DMA entries\n\nAdd a new field num_mapped_sgs to struct urb so that we have a place to\nstore the number of mapped entries and can also retain the original\nvalue of entries in num_sgs.  Previously, usb_hcd_map_urb_for_dma()\nwould overwrite this with the number of mapped entries, which would\nbreak dma_unmap_sg() because it requires the original number of entries.\n\nThis fixes warnings like the following when using USB storage devices:\n ------------[ cut here ]------------\n WARNING: at lib/dma-debug.c:902 check_unmap+0x4e4/0x695()\n ehci_hcd 0000:00:12.2: DMA-API: device driver frees DMA sg list with different entry count [map count\u003d4] [unmap count\u003d1]\n Modules linked in: ohci_hcd ehci_hcd\n Pid: 0, comm: kworker/0:1 Not tainted 3.2.0-rc2+ #319\n Call Trace:\n  \u003cIRQ\u003e  [\u003cffffffff81036d3b\u003e] warn_slowpath_common+0x80/0x98\n  [\u003cffffffff81036de7\u003e] warn_slowpath_fmt+0x41/0x43\n  [\u003cffffffff811fa5ae\u003e] check_unmap+0x4e4/0x695\n  [\u003cffffffff8105e92c\u003e] ? trace_hardirqs_off+0xd/0xf\n  [\u003cffffffff8147208b\u003e] ? _raw_spin_unlock_irqrestore+0x33/0x50\n  [\u003cffffffff811fa84a\u003e] debug_dma_unmap_sg+0xeb/0x117\n  [\u003cffffffff8137b02f\u003e] usb_hcd_unmap_urb_for_dma+0x71/0x188\n  [\u003cffffffff8137b166\u003e] unmap_urb_for_dma+0x20/0x22\n  [\u003cffffffff8137b1c5\u003e] usb_hcd_giveback_urb+0x5d/0xc0\n  [\u003cffffffffa0000d02\u003e] ehci_urb_done+0xf7/0x10c [ehci_hcd]\n  [\u003cffffffffa0001140\u003e] qh_completions+0x429/0x4bd [ehci_hcd]\n  [\u003cffffffffa000340a\u003e] ehci_work+0x95/0x9c0 [ehci_hcd]\n  ...\n ---[ end trace f29ac88a5a48c580 ]---\n Mapped at:\n  [\u003cffffffff811faac4\u003e] debug_dma_map_sg+0x45/0x139\n  [\u003cffffffff8137bc0b\u003e] usb_hcd_map_urb_for_dma+0x22e/0x478\n  [\u003cffffffff8137c494\u003e] usb_hcd_submit_urb+0x63f/0x6fa\n  [\u003cffffffff8137d01c\u003e] usb_submit_urb+0x2c7/0x2de\n  [\u003cffffffff8137dcd4\u003e] usb_sg_wait+0x55/0x161\n\nSigned-off-by: Clemens Ladisch \u003cclemens@ladisch.de\u003e\nCc: stable \u003cstable@vger.kernel.org\u003e\nSigned-off-by: Greg Kroah-Hartman \u003cgregkh@suse.de\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "43a89e4ba928f1c10eec15e3eed4d0534b8f392f",
      "old_mode": 33188,
      "old_path": "drivers/usb/core/hcd.c",
      "new_id": "2cec49d1773d7e82c9a8d84d9575f1ef4b42b1fb",
      "new_mode": 33188,
      "new_path": "drivers/usb/core/hcd.c"
    },
    {
      "type": "modify",
      "old_id": "f136f7f1c4f431f90f863c102bfffd92f6948ba1",
      "old_mode": 33188,
      "old_path": "drivers/usb/host/ehci-q.c",
      "new_id": "36ca5077cdf79df7898880024470f788b7bac45f",
      "new_mode": 33188,
      "new_path": "drivers/usb/host/ehci-q.c"
    },
    {
      "type": "modify",
      "old_id": "f6ca80ee4cec0ddbe9d44159bb1862b3a9c19843",
      "old_mode": 33188,
      "old_path": "drivers/usb/host/uhci-q.c",
      "new_id": "d2c6f5ac4626af6c0297ab1348b9a14b18f77605",
      "new_mode": 33188,
      "new_path": "drivers/usb/host/uhci-q.c"
    },
    {
      "type": "modify",
      "old_id": "d6e175428618d4b31f69bd3d323e7c5aef93deae",
      "old_mode": 33188,
      "old_path": "drivers/usb/host/whci/qset.c",
      "new_id": "a91712c8bff5f44ff7c459c9c2d5ca330eba3f0c",
      "new_mode": 33188,
      "new_path": "drivers/usb/host/whci/qset.c"
    },
    {
      "type": "modify",
      "old_id": "133ce302c8607a593f31dcbf872cf0f9ce3870da",
      "old_mode": 33188,
      "old_path": "drivers/usb/host/xhci-ring.c",
      "new_id": "d030f0b2bfa26061e3173b641e9ca4d67e7cd961",
      "new_mode": 33188,
      "new_path": "drivers/usb/host/xhci-ring.c"
    },
    {
      "type": "modify",
      "old_id": "2f05a7fa1ecfb9b038991b71fd523598246e15a2",
      "old_mode": 33188,
      "old_path": "include/linux/usb.h",
      "new_id": "4269c3f881481298098271b9707e5948066c9d9d",
      "new_mode": 33188,
      "new_path": "include/linux/usb.h"
    }
  ]
}
