diff options
author | Anthony Liguori <anthony@codemonkey.ws> | 2013-09-03 12:31:30 -0500 |
---|---|---|
committer | Anthony Liguori <anthony@codemonkey.ws> | 2013-09-03 12:31:30 -0500 |
commit | 9ea0f58fc723daeb9e1dba9a762269e8cbbd1b73 (patch) | |
tree | 1d985efb12e0e411e8a4cf5c842967897600b8f6 /hw/usb/dev-uas.c | |
parent | 9889e04ac193cad7fa0526573ce0cc752dcabb99 (diff) | |
parent | 31efd2e883018b4c079ad082105bc161fbb3fef8 (diff) | |
download | qemu-9ea0f58fc723daeb9e1dba9a762269e8cbbd1b73.zip |
Merge remote-tracking branch 'kraxel/usb.88' into staging
# By Gerd Hoffmann (10) and Marcel Apfelbaum (1)
# Via Gerd Hoffmann
* kraxel/usb.88:
usb/dev-hid: Modified usb-tablet category from Misc to Input
Revert "usb-hub: report status changes only once"
usb-hub: add tracepoint for status reports
usb: parallelize usb3 streams
uas: add property for request logging
xhci: reset port when disabling slot
xhci: emulate intr endpoint intervals correctly
xhci: fix endpoint interval calculation
xhci: add port to slot_address tracepoint
xhci: add tracepoint for endpoint state changes
xhci: remove leftover debug printf
Message-id: 1378117055-29620-1-git-send-email-kraxel@redhat.com
Signed-off-by: Anthony Liguori <anthony@codemonkey.ws>
Diffstat (limited to 'hw/usb/dev-uas.c')
-rw-r--r-- | hw/usb/dev-uas.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/hw/usb/dev-uas.c b/hw/usb/dev-uas.c index 1569d6e2ef..70ed2d1dbd 100644 --- a/hw/usb/dev-uas.c +++ b/hw/usb/dev-uas.c @@ -113,6 +113,9 @@ struct UASDevice { QTAILQ_HEAD(, UASStatus) results; QTAILQ_HEAD(, UASRequest) requests; + /* properties */ + uint32_t requestlog; + /* usb 2.0 only */ USBPacket *status2; UASRequest *datain2; @@ -692,9 +695,9 @@ static void usb_uas_command(UASDevice *uas, uas_ui *ui) req->req = scsi_req_new(req->dev, req->tag, usb_uas_get_lun(req->lun), ui->command.cdb, req); -#if 1 - scsi_req_print(req->req); -#endif + if (uas->requestlog) { + scsi_req_print(req->req); + } len = scsi_req_enqueue(req->req); if (len) { req->data_size = len; @@ -903,6 +906,11 @@ static const VMStateDescription vmstate_usb_uas = { } }; +static Property uas_properties[] = { + DEFINE_PROP_UINT32("log-scsi-req", UASDevice, requestlog, 0), + DEFINE_PROP_END_OF_LIST(), +}; + static void usb_uas_class_initfn(ObjectClass *klass, void *data) { DeviceClass *dc = DEVICE_CLASS(klass); @@ -920,6 +928,7 @@ static void usb_uas_class_initfn(ObjectClass *klass, void *data) set_bit(DEVICE_CATEGORY_STORAGE, dc->categories); dc->fw_name = "storage"; dc->vmsd = &vmstate_usb_uas; + dc->props = uas_properties; } static const TypeInfo uas_info = { |