[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 1/5] xhci: Fix remainder field for TR_SETUP completio
From: |
Gerd Hoffmann |
Subject: |
[Qemu-devel] [PULL 1/5] xhci: Fix remainder field for TR_SETUP completion event. |
Date: |
Wed, 14 Sep 2016 11:33:31 +0200 |
From: Hans Petter Selasky <address@hidden>
Previously the code would incorrectly report the remainder as 8 bytes. A
remainder of 0 bytes should be reported when the SETUP packet is
successfully transferred. Found using FreeBSD's XHCI driver.
Signed-off-by: Hans Petter Selasky <address@hidden>
[ kraxel: codestyle fixup ]
Signed-off-by: Gerd Hoffmann <address@hidden>
---
hw/usb/hcd-xhci.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/hw/usb/hcd-xhci.c b/hw/usb/hcd-xhci.c
index 188f954..37c1493 100644
--- a/hw/usb/hcd-xhci.c
+++ b/hw/usb/hcd-xhci.c
@@ -1753,6 +1753,12 @@ static void xhci_xfer_report(XHCITransfer *xfer)
unsigned int chunk = 0;
switch (TRB_TYPE(*trb)) {
+ case TR_SETUP:
+ chunk = trb->status & 0x1ffff;
+ if (chunk > 8) {
+ chunk = 8;
+ }
+ break;
case TR_DATA:
case TR_NORMAL:
case TR_ISOCH:
--
1.8.3.1
- [Qemu-devel] [PULL 0/5] usb: large file support for mtp, bugfixes., Gerd Hoffmann, 2016/09/14
- [Qemu-devel] [PULL 3/5] usb:xhci:fix memory leak in usb_xhci_exit, Gerd Hoffmann, 2016/09/14
- [Qemu-devel] [PULL 1/5] xhci: Fix remainder field for TR_SETUP completion event.,
Gerd Hoffmann <=
- [Qemu-devel] [PULL 2/5] usb-host: fix streams detection in usb_host_speed_compat, Gerd Hoffmann, 2016/09/14
- [Qemu-devel] [PULL 4/5] usb-mtp: fix sending files larger than 4gb, Gerd Hoffmann, 2016/09/14
- [Qemu-devel] [PULL 5/5] usb-mtp: added object properties, Gerd Hoffmann, 2016/09/14
- Re: [Qemu-devel] [PULL 0/5] usb: large file support for mtp, bugfixes., Peter Maydell, 2016/09/15