aboutsummaryrefslogtreecommitdiff
path: root/hw/usb/hcd-xhci.c
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2012-11-01 17:15:05 +0100
committerGerd Hoffmann <kraxel@redhat.com>2012-11-08 18:41:47 +0100
commit9b8251c5c44a70a63c642e4e345fa8c12ed022ed (patch)
tree11499015eacfe97af6634eaf83b8c551853faf96 /hw/usb/hcd-xhci.c
parente696b1da42cd80787d45f6e9a6329d9ef3c8acb2 (diff)
downloadqemu-9b8251c5c44a70a63c642e4e345fa8c12ed022ed.zip
qemu-9b8251c5c44a70a63c642e4e345fa8c12ed022ed.tar.gz
qemu-9b8251c5c44a70a63c642e4e345fa8c12ed022ed.tar.bz2
xhci: Add support for packets with both data and an error status
Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'hw/usb/hcd-xhci.c')
-rw-r--r--hw/usb/hcd-xhci.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/usb/hcd-xhci.c b/hw/usb/hcd-xhci.c
index d4a2e0c..a181d45 100644
--- a/hw/usb/hcd-xhci.c
+++ b/hw/usb/hcd-xhci.c
@@ -1388,7 +1388,7 @@ static void xhci_xfer_report(XHCITransfer *xfer)
XHCIState *xhci = xfer->xhci;
int i;
- left = xfer->packet.status ? 0 : xfer->packet.actual_length;
+ left = xfer->packet.actual_length;
for (i = 0; i < xfer->trb_count; i++) {
XHCITRB *trb = &xfer->trbs[i];
@@ -1416,7 +1416,7 @@ static void xhci_xfer_report(XHCITransfer *xfer)
if (!reported && ((trb->control & TRB_TR_IOC) ||
(shortpkt && (trb->control & TRB_TR_ISP)) ||
- (xfer->status != CC_SUCCESS))) {
+ (xfer->status != CC_SUCCESS && left == 0))) {
event.slotid = xfer->slotid;
event.epid = xfer->epid;
event.length = (trb->status & 0x1ffff) - chunk;