[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 06/17] uas: Streams are numbered 1-y, rather then 0-
From: |
Gerd Hoffmann |
Subject: |
[Qemu-devel] [PATCH 06/17] uas: Streams are numbered 1-y, rather then 0-x |
Date: |
Fri, 29 Nov 2013 09:06:10 +0100 |
From: Hans de Goede <address@hidden>
It is easier to simply make the arrays one larger, rather then
substracting one everywhere.
Signed-off-by: Hans de Goede <address@hidden>
Signed-off-by: Gerd Hoffmann <address@hidden>
---
hw/usb/dev-uas.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/hw/usb/dev-uas.c b/hw/usb/dev-uas.c
index 12d79ef..70f41d3 100644
--- a/hw/usb/dev-uas.c
+++ b/hw/usb/dev-uas.c
@@ -122,8 +122,8 @@ struct UASDevice {
UASRequest *dataout2;
/* usb 3.0 only */
- USBPacket *data3[UAS_MAX_STREAMS];
- USBPacket *status3[UAS_MAX_STREAMS];
+ USBPacket *data3[UAS_MAX_STREAMS + 1];
+ USBPacket *status3[UAS_MAX_STREAMS + 1];
};
struct UASRequest {
@@ -666,7 +666,7 @@ static void usb_uas_cancel_io(USBDevice *dev, USBPacket *p)
return;
}
if (uas_using_streams(uas)) {
- for (i = 0; i < UAS_MAX_STREAMS; i++) {
+ for (i = 0; i <= UAS_MAX_STREAMS; i++) {
if (uas->status3[i] == p) {
uas->status3[i] = NULL;
return;
--
1.8.3.1
- [Qemu-devel] [PULL 00/17] usb patch queue, Gerd Hoffmann, 2013/11/29
- [Qemu-devel] [PATCH 02/17] xhci: add support for suspend/resume, Gerd Hoffmann, 2013/11/29
- [Qemu-devel] [PATCH 01/17] xhci: Add a few missing checks for disconnected devices, Gerd Hoffmann, 2013/11/29
- [Qemu-devel] [PATCH 13/17] ehci: implement port wakeup, Gerd Hoffmann, 2013/11/29
- [Qemu-devel] [PATCH 11/17] usb: Add usb_device_alloc/free_streams, Gerd Hoffmann, 2013/11/29
- [Qemu-devel] [PATCH 12/17] xhci: Call usb_device_alloc/free_streams, Gerd Hoffmann, 2013/11/29
- [Qemu-devel] [PATCH 17/17] usb: move usb_{hi, lo} helpers to header file., Gerd Hoffmann, 2013/11/29
- [Qemu-devel] [PATCH 07/17] uas: Bounds check tags when using streams, Gerd Hoffmann, 2013/11/29
- [Qemu-devel] [PATCH 14/17] Revert "usb-tablet: Don't claim wakeup capability for USB-2 version", Gerd Hoffmann, 2013/11/29
- [Qemu-devel] [PATCH 06/17] uas: Streams are numbered 1-y, rather then 0-x,
Gerd Hoffmann <=
- [Qemu-devel] [PATCH 15/17] trace-events: Clean up after removal of old usb-host code, Gerd Hoffmann, 2013/11/29
- [Qemu-devel] [PATCH 08/17] uas: Fix response iu struct definition, Gerd Hoffmann, 2013/11/29
- [Qemu-devel] [PATCH 09/17] uas: s/ui/iu/, Gerd Hoffmann, 2013/11/29
- [Qemu-devel] [PATCH 16/17] usb: add vendor request defines, Gerd Hoffmann, 2013/11/29
- [Qemu-devel] [PATCH 04/17] uas: Only use report iu-s for task_mgmt status reporting, Gerd Hoffmann, 2013/11/29
- [Qemu-devel] [PATCH 10/17] usb: Add max_streams attribute to endpoint info, Gerd Hoffmann, 2013/11/29
- [Qemu-devel] [PATCH 05/17] uas: Fix / cleanup usb_uas_task error handling, Gerd Hoffmann, 2013/11/29
- [Qemu-devel] [PATCH 03/17] scsi: Add 2 new sense codes needed by uas, Gerd Hoffmann, 2013/11/29