]> 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)
committerGerd Hoffmann <kraxel@redhat.com>
Tue, 11 Sep 2012 05:43:01 +0000 (07:43 +0200)
commitd5a15814b413869667b2a3215772986885be574a
treed2d138d042238f34d371a8eaa14ae5e1665ab488
parent331e9406f152b6bae6859a153d36e5076c58901d
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>
hw/usb/hcd-xhci.c
trace-events