]> git.proxmox.com Git - qemu.git/commit
xhci: drop buffering
authorGerd Hoffmann <kraxel@redhat.com>
Fri, 17 Aug 2012 09:04:36 +0000 (11:04 +0200)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Fri, 12 Oct 2012 02:44:15 +0000 (21:44 -0500)
commit640bda8df50d07daccceb646ed7d047bf1080c55
tree1984acc95cb81be2f0263c44ee3d948c750815b9
parent64022e9d58dc7cf48fee14ca08f4c84ac5d70fe0
xhci: drop buffering

This patch splits the xhci_xfer_data function into three.
The xhci_xfer_data function used to do does two things:

  (1) copy transfer data between guest memory and a temporary buffer.
  (2) report transfer results to the guest using events.

Now we three functions to handle this:

  (1) xhci_xfer_map creates a scatter list for the transfer and
      uses that (instead of the temporary buffer) to build a
      USBPacket.
  (2) xhci_xfer_unmap undoes the mapping.
  (3) xhci_xfer_report sends out events.

The patch also fixes reporting of transaction errors which must be
reported unconditinally, not only in case the guest asks for it
using the ISP flag.

[ v2: fix warning ]

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
(cherry picked from commit d5a15814b413869667b2a3215772986885be574a)

Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
hw/usb/hcd-xhci.c
trace-events