thebeanogamer / rpms / qemu-kvm

Forked from rpms/qemu-kvm 5 months ago
Clone
958e1b
From 120f0850e08e429f7782df32412ce7cbb626a654 Mon Sep 17 00:00:00 2001
958e1b
From: Gerd Hoffmann <kraxel@redhat.com>
958e1b
Date: Fri, 11 Jul 2014 14:21:00 +0200
958e1b
Subject: [PATCH 26/43] xhci: use DPRINTF() instead of fprintf(stderr, ...)
958e1b
958e1b
Message-id: <1405088470-24115-28-git-send-email-kraxel@redhat.com>
958e1b
Patchwork-id: 59856
958e1b
O-Subject: [RHEL-7.1 qemu-kvm PATCH 27/37] xhci: use DPRINTF() instead of fprintf(stderr, ...)
958e1b
Bugzilla: 980833
958e1b
RH-Acked-by: Dr. David Alan Gilbert (git) <dgilbert@redhat.com>
958e1b
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>
958e1b
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>
958e1b
958e1b
So we don't spam stderr with (guest-triggerable) messages by default.
958e1b
958e1b
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
958e1b
(cherry picked from commit d6bb65fcd24c8cb8c37ffe324c360f3b0c94b902)
958e1b
---
958e1b
 hw/usb/hcd-xhci.c | 90 +++++++++++++++++++++++++++----------------------------
958e1b
 1 file changed, 45 insertions(+), 45 deletions(-)
958e1b
958e1b
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
958e1b
---
958e1b
 hw/usb/hcd-xhci.c | 90 +++++++++++++++++++++++++++----------------------------
958e1b
 1 file changed, 45 insertions(+), 45 deletions(-)
958e1b
958e1b
diff --git a/hw/usb/hcd-xhci.c b/hw/usb/hcd-xhci.c
958e1b
index f937b4e..2352b12 100644
958e1b
--- a/hw/usb/hcd-xhci.c
958e1b
+++ b/hw/usb/hcd-xhci.c
958e1b
@@ -810,7 +810,7 @@ static inline int xhci_running(XHCIState *xhci)
958e1b
 static void xhci_die(XHCIState *xhci)
958e1b
 {
958e1b
     xhci->usbsts |= USBSTS_HCE;
958e1b
-    fprintf(stderr, "xhci: asserted controller error\n");
958e1b
+    DPRINTF("xhci: asserted controller error\n");
958e1b
 }
958e1b
 
958e1b
 static void xhci_write_event(XHCIState *xhci, XHCIEvent *event, int v)
958e1b
@@ -857,8 +857,8 @@ static void xhci_events_update(XHCIState *xhci, int v)
958e1b
     erdp = xhci_addr64(intr->erdp_low, intr->erdp_high);
958e1b
     if (erdp < intr->er_start ||
958e1b
         erdp >= (intr->er_start + TRB_SIZE*intr->er_size)) {
958e1b
-        fprintf(stderr, "xhci: ERDP out of bounds: "DMA_ADDR_FMT"\n", erdp);
958e1b
-        fprintf(stderr, "xhci: ER[%d] at "DMA_ADDR_FMT" len %d\n",
958e1b
+        DPRINTF("xhci: ERDP out of bounds: "DMA_ADDR_FMT"\n", erdp);
958e1b
+        DPRINTF("xhci: ER[%d] at "DMA_ADDR_FMT" len %d\n",
958e1b
                 v, intr->er_start, intr->er_size);
958e1b
         xhci_die(xhci);
958e1b
         return;
958e1b
@@ -926,7 +926,7 @@ static void xhci_event(XHCIState *xhci, XHCIEvent *event, int v)
958e1b
     if (intr->er_full) {
958e1b
         DPRINTF("xhci_event(): ER full, queueing\n");
958e1b
         if (((intr->ev_buffer_put+1) % EV_QUEUE) == intr->ev_buffer_get) {
958e1b
-            fprintf(stderr, "xhci: event queue full, dropping event!\n");
958e1b
+            DPRINTF("xhci: event queue full, dropping event!\n");
958e1b
             return;
958e1b
         }
958e1b
         intr->ev_buffer[intr->ev_buffer_put++] = *event;
958e1b
@@ -939,8 +939,8 @@ static void xhci_event(XHCIState *xhci, XHCIEvent *event, int v)
958e1b
     erdp = xhci_addr64(intr->erdp_low, intr->erdp_high);
958e1b
     if (erdp < intr->er_start ||
958e1b
         erdp >= (intr->er_start + TRB_SIZE*intr->er_size)) {
958e1b
-        fprintf(stderr, "xhci: ERDP out of bounds: "DMA_ADDR_FMT"\n", erdp);
958e1b
-        fprintf(stderr, "xhci: ER[%d] at "DMA_ADDR_FMT" len %d\n",
958e1b
+        DPRINTF("xhci: ERDP out of bounds: "DMA_ADDR_FMT"\n", erdp);
958e1b
+        DPRINTF("xhci: ER[%d] at "DMA_ADDR_FMT" len %d\n",
958e1b
                 v, intr->er_start, intr->er_size);
958e1b
         xhci_die(xhci);
958e1b
         return;
958e1b
@@ -957,7 +957,7 @@ static void xhci_event(XHCIState *xhci, XHCIEvent *event, int v)
958e1b
 #endif
958e1b
         intr->er_full = 1;
958e1b
         if (((intr->ev_buffer_put+1) % EV_QUEUE) == intr->ev_buffer_get) {
958e1b
-            fprintf(stderr, "xhci: event queue full, dropping event!\n");
958e1b
+            DPRINTF("xhci: event queue full, dropping event!\n");
958e1b
             return;
958e1b
         }
958e1b
         intr->ev_buffer[intr->ev_buffer_put++] = *event;
958e1b
@@ -1075,7 +1075,7 @@ static void xhci_er_reset(XHCIState *xhci, int v)
958e1b
     }
958e1b
     /* cache the (sole) event ring segment location */
958e1b
     if (intr->erstsz != 1) {
958e1b
-        fprintf(stderr, "xhci: invalid value for ERSTSZ: %d\n", intr->erstsz);
958e1b
+        DPRINTF("xhci: invalid value for ERSTSZ: %d\n", intr->erstsz);
958e1b
         xhci_die(xhci);
958e1b
         return;
958e1b
     }
958e1b
@@ -1085,7 +1085,7 @@ static void xhci_er_reset(XHCIState *xhci, int v)
958e1b
     le32_to_cpus(&seg.addr_high);
958e1b
     le32_to_cpus(&seg.size);
958e1b
     if (seg.size < 16 || seg.size > 4096) {
958e1b
-        fprintf(stderr, "xhci: invalid value for segment size: %d\n", seg.size);
958e1b
+        DPRINTF("xhci: invalid value for segment size: %d\n", seg.size);
958e1b
         xhci_die(xhci);
958e1b
         return;
958e1b
     }
958e1b
@@ -1251,7 +1251,7 @@ static TRBCCode xhci_alloc_device_streams(XHCIState *xhci, unsigned int slotid,
958e1b
 
958e1b
     r = usb_device_alloc_streams(eps[0]->dev, eps, nr_eps, req_nr_streams);
958e1b
     if (r != 0) {
958e1b
-        fprintf(stderr, "xhci: alloc streams failed\n");
958e1b
+        DPRINTF("xhci: alloc streams failed\n");
958e1b
         return CC_RESOURCE_ERROR;
958e1b
     }
958e1b
 
958e1b
@@ -1535,7 +1535,7 @@ static TRBCCode xhci_stop_ep(XHCIState *xhci, unsigned int slotid,
958e1b
     assert(slotid >= 1 && slotid <= xhci->numslots);
958e1b
 
958e1b
     if (epid < 1 || epid > 31) {
958e1b
-        fprintf(stderr, "xhci: bad ep %d\n", epid);
958e1b
+        DPRINTF("xhci: bad ep %d\n", epid);
958e1b
         return CC_TRB_ERROR;
958e1b
     }
958e1b
 
958e1b
@@ -1547,7 +1547,7 @@ static TRBCCode xhci_stop_ep(XHCIState *xhci, unsigned int slotid,
958e1b
     }
958e1b
 
958e1b
     if (xhci_ep_nuke_xfers(xhci, slotid, epid, CC_STOPPED) > 0) {
958e1b
-        fprintf(stderr, "xhci: FIXME: endpoint stopped w/ xfers running, "
958e1b
+        DPRINTF("xhci: FIXME: endpoint stopped w/ xfers running, "
958e1b
                 "data might be lost\n");
958e1b
     }
958e1b
 
958e1b
@@ -1572,7 +1572,7 @@ static TRBCCode xhci_reset_ep(XHCIState *xhci, unsigned int slotid,
958e1b
     assert(slotid >= 1 && slotid <= xhci->numslots);
958e1b
 
958e1b
     if (epid < 1 || epid > 31) {
958e1b
-        fprintf(stderr, "xhci: bad ep %d\n", epid);
958e1b
+        DPRINTF("xhci: bad ep %d\n", epid);
958e1b
         return CC_TRB_ERROR;
958e1b
     }
958e1b
 
958e1b
@@ -1586,13 +1586,13 @@ static TRBCCode xhci_reset_ep(XHCIState *xhci, unsigned int slotid,
958e1b
     epctx = slot->eps[epid-1];
958e1b
 
958e1b
     if (epctx->state != EP_HALTED) {
958e1b
-        fprintf(stderr, "xhci: reset EP while EP %d not halted (%d)\n",
958e1b
+        DPRINTF("xhci: reset EP while EP %d not halted (%d)\n",
958e1b
                 epid, epctx->state);
958e1b
         return CC_CONTEXT_STATE_ERROR;
958e1b
     }
958e1b
 
958e1b
     if (xhci_ep_nuke_xfers(xhci, slotid, epid, 0) > 0) {
958e1b
-        fprintf(stderr, "xhci: FIXME: endpoint reset w/ xfers running, "
958e1b
+        DPRINTF("xhci: FIXME: endpoint reset w/ xfers running, "
958e1b
                 "data might be lost\n");
958e1b
     }
958e1b
 
958e1b
@@ -1629,7 +1629,7 @@ static TRBCCode xhci_set_ep_dequeue(XHCIState *xhci, unsigned int slotid,
958e1b
     assert(slotid >= 1 && slotid <= xhci->numslots);
958e1b
 
958e1b
     if (epid < 1 || epid > 31) {
958e1b
-        fprintf(stderr, "xhci: bad ep %d\n", epid);
958e1b
+        DPRINTF("xhci: bad ep %d\n", epid);
958e1b
         return CC_TRB_ERROR;
958e1b
     }
958e1b
 
958e1b
@@ -1646,7 +1646,7 @@ static TRBCCode xhci_set_ep_dequeue(XHCIState *xhci, unsigned int slotid,
958e1b
     epctx = slot->eps[epid-1];
958e1b
 
958e1b
     if (epctx->state != EP_STOPPED) {
958e1b
-        fprintf(stderr, "xhci: set EP dequeue pointer while EP %d not stopped\n", epid);
958e1b
+        DPRINTF("xhci: set EP dequeue pointer while EP %d not stopped\n", epid);
958e1b
         return CC_CONTEXT_STATE_ERROR;
958e1b
     }
958e1b
 
958e1b
@@ -1688,7 +1688,7 @@ static int xhci_xfer_create_sgl(XHCITransfer *xfer, int in_xfer)
958e1b
         switch (TRB_TYPE(*trb)) {
958e1b
         case TR_DATA:
958e1b
             if ((!(trb->control & TRB_TR_DIR)) != (!in_xfer)) {
958e1b
-                fprintf(stderr, "xhci: data direction mismatch for TR_DATA\n");
958e1b
+                DPRINTF("xhci: data direction mismatch for TR_DATA\n");
958e1b
                 goto err;
958e1b
             }
958e1b
             /* fallthrough */
958e1b
@@ -1698,7 +1698,7 @@ static int xhci_xfer_create_sgl(XHCITransfer *xfer, int in_xfer)
958e1b
             chunk = trb->status & 0x1ffff;
958e1b
             if (trb->control & TRB_TR_IDT) {
958e1b
                 if (chunk > 8 || in_xfer) {
958e1b
-                    fprintf(stderr, "xhci: invalid immediate data TRB\n");
958e1b
+                    DPRINTF("xhci: invalid immediate data TRB\n");
958e1b
                     goto err;
958e1b
                 }
958e1b
                 qemu_sglist_add(&xfer->sgl, trb->addr, chunk);
958e1b
@@ -1827,7 +1827,7 @@ static int xhci_setup_packet(XHCITransfer *xfer)
958e1b
     } else {
958e1b
         ep = xhci_epid_to_usbep(xhci, xfer->slotid, xfer->epid);
958e1b
         if (!ep) {
958e1b
-            fprintf(stderr, "xhci: slot %d has no device\n",
958e1b
+            DPRINTF("xhci: slot %d has no device\n",
958e1b
                     xfer->slotid);
958e1b
             return -1;
958e1b
         }
958e1b
@@ -1890,7 +1890,7 @@ static int xhci_complete_packet(XHCITransfer *xfer)
958e1b
         xhci_stall_ep(xfer);
958e1b
         break;
958e1b
     default:
958e1b
-        fprintf(stderr, "%s: FIXME: status = %d\n", __func__,
958e1b
+        DPRINTF("%s: FIXME: status = %d\n", __func__,
958e1b
                 xfer->packet.status);
958e1b
         FIXME("unhandled USB_RET_*");
958e1b
     }
958e1b
@@ -1914,21 +1914,21 @@ static int xhci_fire_ctl_transfer(XHCIState *xhci, XHCITransfer *xfer)
958e1b
 
958e1b
     /* do some sanity checks */
958e1b
     if (TRB_TYPE(*trb_setup) != TR_SETUP) {
958e1b
-        fprintf(stderr, "xhci: ep0 first TD not SETUP: %d\n",
958e1b
+        DPRINTF("xhci: ep0 first TD not SETUP: %d\n",
958e1b
                 TRB_TYPE(*trb_setup));
958e1b
         return -1;
958e1b
     }
958e1b
     if (TRB_TYPE(*trb_status) != TR_STATUS) {
958e1b
-        fprintf(stderr, "xhci: ep0 last TD not STATUS: %d\n",
958e1b
+        DPRINTF("xhci: ep0 last TD not STATUS: %d\n",
958e1b
                 TRB_TYPE(*trb_status));
958e1b
         return -1;
958e1b
     }
958e1b
     if (!(trb_setup->control & TRB_TR_IDT)) {
958e1b
-        fprintf(stderr, "xhci: Setup TRB doesn't have IDT set\n");
958e1b
+        DPRINTF("xhci: Setup TRB doesn't have IDT set\n");
958e1b
         return -1;
958e1b
     }
958e1b
     if ((trb_setup->status & 0x1ffff) != 8) {
958e1b
-        fprintf(stderr, "xhci: Setup TRB has bad length (%d)\n",
958e1b
+        DPRINTF("xhci: Setup TRB has bad length (%d)\n",
958e1b
                 (trb_setup->status & 0x1ffff));
958e1b
         return -1;
958e1b
     }
958e1b
@@ -2079,12 +2079,12 @@ static void xhci_kick_ep(XHCIState *xhci, unsigned int slotid,
958e1b
     assert(epid >= 1 && epid <= 31);
958e1b
 
958e1b
     if (!xhci->slots[slotid-1].enabled) {
958e1b
-        fprintf(stderr, "xhci: xhci_kick_ep for disabled slot %d\n", slotid);
958e1b
+        DPRINTF("xhci: xhci_kick_ep for disabled slot %d\n", slotid);
958e1b
         return;
958e1b
     }
958e1b
     epctx = xhci->slots[slotid-1].eps[epid-1];
958e1b
     if (!epctx) {
958e1b
-        fprintf(stderr, "xhci: xhci_kick_ep for disabled endpoint %d,%d\n",
958e1b
+        DPRINTF("xhci: xhci_kick_ep for disabled endpoint %d,%d\n",
958e1b
                 epid, slotid);
958e1b
         return;
958e1b
     }
958e1b
@@ -2189,14 +2189,14 @@ static void xhci_kick_ep(XHCIState *xhci, unsigned int slotid,
958e1b
                 epctx->next_xfer = (epctx->next_xfer + 1) % TD_QUEUE;
958e1b
                 ep = xfer->packet.ep;
958e1b
             } else {
958e1b
-                fprintf(stderr, "xhci: error firing CTL transfer\n");
958e1b
+                DPRINTF("xhci: error firing CTL transfer\n");
958e1b
             }
958e1b
         } else {
958e1b
             if (xhci_fire_transfer(xhci, xfer, epctx) >= 0) {
958e1b
                 epctx->next_xfer = (epctx->next_xfer + 1) % TD_QUEUE;
958e1b
             } else {
958e1b
                 if (!xfer->timed_xfer) {
958e1b
-                    fprintf(stderr, "xhci: error firing data transfer\n");
958e1b
+                    DPRINTF("xhci: error firing data transfer\n");
958e1b
                 }
958e1b
             }
958e1b
         }
958e1b
@@ -2299,7 +2299,7 @@ static TRBCCode xhci_address_slot(XHCIState *xhci, unsigned int slotid,
958e1b
     xhci_dma_read_u32s(xhci, ictx, ictl_ctx, sizeof(ictl_ctx));
958e1b
 
958e1b
     if (ictl_ctx[0] != 0x0 || ictl_ctx[1] != 0x3) {
958e1b
-        fprintf(stderr, "xhci: invalid input context control %08x %08x\n",
958e1b
+        DPRINTF("xhci: invalid input context control %08x %08x\n",
958e1b
                 ictl_ctx[0], ictl_ctx[1]);
958e1b
         return CC_TRB_ERROR;
958e1b
     }
958e1b
@@ -2315,14 +2315,14 @@ static TRBCCode xhci_address_slot(XHCIState *xhci, unsigned int slotid,
958e1b
 
958e1b
     uport = xhci_lookup_uport(xhci, slot_ctx);
958e1b
     if (uport == NULL) {
958e1b
-        fprintf(stderr, "xhci: port not found\n");
958e1b
+        DPRINTF("xhci: port not found\n");
958e1b
         return CC_TRB_ERROR;
958e1b
     }
958e1b
     trace_usb_xhci_slot_address(slotid, uport->path);
958e1b
 
958e1b
     dev = uport->dev;
958e1b
     if (!dev || !dev->attached) {
958e1b
-        fprintf(stderr, "xhci: port %s not connected\n", uport->path);
958e1b
+        DPRINTF("xhci: port %s not connected\n", uport->path);
958e1b
         return CC_USB_TRANSACTION_ERROR;
958e1b
     }
958e1b
 
958e1b
@@ -2331,7 +2331,7 @@ static TRBCCode xhci_address_slot(XHCIState *xhci, unsigned int slotid,
958e1b
             continue;
958e1b
         }
958e1b
         if (xhci->slots[i].uport == uport) {
958e1b
-            fprintf(stderr, "xhci: port %s already assigned to slot %d\n",
958e1b
+            DPRINTF("xhci: port %s already assigned to slot %d\n",
958e1b
                     uport->path, i+1);
958e1b
             return CC_TRB_ERROR;
958e1b
         }
958e1b
@@ -2415,7 +2415,7 @@ static TRBCCode xhci_configure_slot(XHCIState *xhci, unsigned int slotid,
958e1b
     xhci_dma_read_u32s(xhci, ictx, ictl_ctx, sizeof(ictl_ctx));
958e1b
 
958e1b
     if ((ictl_ctx[0] & 0x3) != 0x0 || (ictl_ctx[1] & 0x3) != 0x1) {
958e1b
-        fprintf(stderr, "xhci: invalid input context control %08x %08x\n",
958e1b
+        DPRINTF("xhci: invalid input context control %08x %08x\n",
958e1b
                 ictl_ctx[0], ictl_ctx[1]);
958e1b
         return CC_TRB_ERROR;
958e1b
     }
958e1b
@@ -2424,7 +2424,7 @@ static TRBCCode xhci_configure_slot(XHCIState *xhci, unsigned int slotid,
958e1b
     xhci_dma_read_u32s(xhci, octx, slot_ctx, sizeof(slot_ctx));
958e1b
 
958e1b
     if (SLOT_STATE(slot_ctx[3]) < SLOT_ADDRESSED) {
958e1b
-        fprintf(stderr, "xhci: invalid slot state %08x\n", slot_ctx[3]);
958e1b
+        DPRINTF("xhci: invalid slot state %08x\n", slot_ctx[3]);
958e1b
         return CC_CONTEXT_STATE_ERROR;
958e1b
     }
958e1b
 
958e1b
@@ -2497,7 +2497,7 @@ static TRBCCode xhci_evaluate_slot(XHCIState *xhci, unsigned int slotid,
958e1b
     xhci_dma_read_u32s(xhci, ictx, ictl_ctx, sizeof(ictl_ctx));
958e1b
 
958e1b
     if (ictl_ctx[0] != 0x0 || ictl_ctx[1] & ~0x3) {
958e1b
-        fprintf(stderr, "xhci: invalid input context control %08x %08x\n",
958e1b
+        DPRINTF("xhci: invalid input context control %08x %08x\n",
958e1b
                 ictl_ctx[0], ictl_ctx[1]);
958e1b
         return CC_TRB_ERROR;
958e1b
     }
958e1b
@@ -2576,11 +2576,11 @@ static unsigned int xhci_get_slot(XHCIState *xhci, XHCIEvent *event, XHCITRB *tr
958e1b
     unsigned int slotid;
958e1b
     slotid = (trb->control >> TRB_CR_SLOTID_SHIFT) & TRB_CR_SLOTID_MASK;
958e1b
     if (slotid < 1 || slotid > xhci->numslots) {
958e1b
-        fprintf(stderr, "xhci: bad slot id %d\n", slotid);
958e1b
+        DPRINTF("xhci: bad slot id %d\n", slotid);
958e1b
         event->ccode = CC_TRB_ERROR;
958e1b
         return 0;
958e1b
     } else if (!xhci->slots[slotid-1].enabled) {
958e1b
-        fprintf(stderr, "xhci: slot id %d not enabled\n", slotid);
958e1b
+        DPRINTF("xhci: slot id %d not enabled\n", slotid);
958e1b
         event->ccode = CC_SLOT_NOT_ENABLED_ERROR;
958e1b
         return 0;
958e1b
     }
958e1b
@@ -2696,7 +2696,7 @@ static void xhci_process_commands(XHCIState *xhci)
958e1b
                 }
958e1b
             }
958e1b
             if (i >= xhci->numslots) {
958e1b
-                fprintf(stderr, "xhci: no device slots available\n");
958e1b
+                DPRINTF("xhci: no device slots available\n");
958e1b
                 event.ccode = CC_NO_SLOTS_ERROR;
958e1b
             } else {
958e1b
                 slotid = i+1;
958e1b
@@ -2888,7 +2888,7 @@ static void xhci_reset(DeviceState *dev)
958e1b
 
958e1b
     trace_usb_xhci_reset();
958e1b
     if (!(xhci->usbsts & USBSTS_HCH)) {
958e1b
-        fprintf(stderr, "xhci: reset while running!\n");
958e1b
+        DPRINTF("xhci: reset while running!\n");
958e1b
     }
958e1b
 
958e1b
     xhci->usbcmd = 0;
958e1b
@@ -3066,7 +3066,7 @@ static void xhci_port_write(void *ptr, hwaddr reg,
958e1b
                 /* windows does this for some reason, don't spam stderr */
958e1b
                 break;
958e1b
             default:
958e1b
-                fprintf(stderr, "%s: ignore pls write (old %d, new %d)\n",
958e1b
+                DPRINTF("%s: ignore pls write (old %d, new %d)\n",
958e1b
                         __func__, old_pls, new_pls);
958e1b
                 break;
958e1b
             }
958e1b
@@ -3317,7 +3317,7 @@ static void xhci_doorbell_write(void *ptr, hwaddr reg,
958e1b
     trace_usb_xhci_doorbell_write(reg, val);
958e1b
 
958e1b
     if (!xhci_running(xhci)) {
958e1b
-        fprintf(stderr, "xhci: wrote doorbell while xHC stopped or paused\n");
958e1b
+        DPRINTF("xhci: wrote doorbell while xHC stopped or paused\n");
958e1b
         return;
958e1b
     }
958e1b
 
958e1b
@@ -3327,16 +3327,16 @@ static void xhci_doorbell_write(void *ptr, hwaddr reg,
958e1b
         if (val == 0) {
958e1b
             xhci_process_commands(xhci);
958e1b
         } else {
958e1b
-            fprintf(stderr, "xhci: bad doorbell 0 write: 0x%x\n",
958e1b
+            DPRINTF("xhci: bad doorbell 0 write: 0x%x\n",
958e1b
                     (uint32_t)val);
958e1b
         }
958e1b
     } else {
958e1b
         epid = val & 0xff;
958e1b
         streamid = (val >> 16) & 0xffff;
958e1b
         if (reg > xhci->numslots) {
958e1b
-            fprintf(stderr, "xhci: bad doorbell %d\n", (int)reg);
958e1b
+            DPRINTF("xhci: bad doorbell %d\n", (int)reg);
958e1b
         } else if (epid > 31) {
958e1b
-            fprintf(stderr, "xhci: bad doorbell %d write: 0x%x\n",
958e1b
+            DPRINTF("xhci: bad doorbell %d write: 0x%x\n",
958e1b
                     (int)reg, (uint32_t)val);
958e1b
         } else {
958e1b
             xhci_kick_ep(xhci, reg, epid, streamid);
958e1b
-- 
958e1b
1.8.3.1
958e1b