usb: dwc3: gadget: remove redundant trace prints
authorFelipe Balbi <felipe.balbi@linux.intel.com>
Mon, 26 Sep 2016 08:16:39 +0000 (11:16 +0300)
committerFelipe Balbi <felipe.balbi@linux.intel.com>
Mon, 31 Oct 2016 09:15:36 +0000 (11:15 +0200)
Removing some trace prints which were made redundant
when we started decoding events and TRBs completely
within their respective trace points.

Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
drivers/usb/dwc3/ep0.c
drivers/usb/dwc3/gadget.c

index fe79d771dee4c4c936ae72756020e047e5500db4..2d2f582068cb0b7b9b90e9347de747af3b2f93ec 100644 (file)
@@ -99,11 +99,8 @@ static int dwc3_ep0_start_trans(struct dwc3 *dwc, u8 epnum, dma_addr_t buf_dma,
        trace_dwc3_prepare_trb(dep, trb);
 
        ret = dwc3_send_gadget_ep_cmd(dep, DWC3_DEPCMD_STARTTRANSFER, &params);
-       if (ret < 0) {
-               dwc3_trace(trace_dwc3_ep0, "%s STARTTRANSFER failed",
-                               dep->name);
+       if (ret < 0)
                return ret;
-       }
 
        dep->flags |= DWC3_EP_BUSY;
        dep->resource_index = dwc3_gadget_ep_get_transfer_index(dep);
@@ -242,11 +239,6 @@ int dwc3_gadget_ep0_queue(struct usb_ep *ep, struct usb_request *request,
                goto out;
        }
 
-       dwc3_trace(trace_dwc3_ep0,
-                       "queueing request %p to %s length %d state '%s'",
-                       request, dep->name, request->length,
-                       dwc3_ep0_state_string(dwc->ep0state));
-
        ret = __dwc3_gadget_ep0_queue(dep, req);
 
 out:
@@ -940,17 +932,14 @@ static void dwc3_ep0_xfer_complete(struct dwc3 *dwc,
 
        switch (dwc->ep0state) {
        case EP0_SETUP_PHASE:
-               dwc3_trace(trace_dwc3_ep0, "Setup Phase");
                dwc3_ep0_inspect_setup(dwc, event);
                break;
 
        case EP0_DATA_PHASE:
-               dwc3_trace(trace_dwc3_ep0, "Data Phase");
                dwc3_ep0_complete_data(dwc, event);
                break;
 
        case EP0_STATUS_PHASE:
-               dwc3_trace(trace_dwc3_ep0, "Status Phase");
                dwc3_ep0_complete_status(dwc, event);
                break;
        default:
@@ -1065,8 +1054,6 @@ static void dwc3_ep0_xfernotready(struct dwc3 *dwc,
 {
        switch (event->status) {
        case DEPEVT_STATUS_CONTROL_DATA:
-               dwc3_trace(trace_dwc3_ep0, "Control Data");
-
                /*
                 * We already have a DATA transfer in the controller's cache,
                 * if we receive a XferNotReady(DATA) we will ignore it, unless
@@ -1092,8 +1079,6 @@ static void dwc3_ep0_xfernotready(struct dwc3 *dwc,
                if (dwc->ep0_next_event != DWC3_EP0_NRDY_STATUS)
                        return;
 
-               dwc3_trace(trace_dwc3_ep0, "Control Status");
-
                dwc->ep0state = EP0_STATUS_PHASE;
 
                if (dwc->delayed_status) {
index ee949420ee26a47e3c36bf74a9adfe4d140df910..fb5d65a58ef802e87ed1566e02527ab04131417c 100644 (file)
@@ -797,10 +797,6 @@ static void dwc3_prepare_one_trb(struct dwc3_ep *dep,
        struct usb_gadget       *gadget = &dwc->gadget;
        enum usb_device_speed   speed = gadget->speed;
 
-       dwc3_trace(trace_dwc3_gadget, "%s: req %p dma %08llx length %d%s",
-                       dep->name, req, (unsigned long long) dma,
-                       length, chain ? " chain" : "");
-
        trb = &dep->trb_pool[dep->trb_enqueue];
 
        if (!req->trb) {
@@ -2142,9 +2138,7 @@ static void dwc3_endpoint_interrupt(struct dwc3 *dwc,
                dep->resource_index = 0;
 
                if (usb_endpoint_xfer_isoc(dep->endpoint.desc)) {
-                       dwc3_trace(trace_dwc3_gadget,
-                                       "%s is an Isochronous endpoint",
-                                       dep->name);
+                       dev_err(dwc->dev, "XferComplete for Isochronous endpoint\n");
                        return;
                }
 
@@ -2157,22 +2151,11 @@ static void dwc3_endpoint_interrupt(struct dwc3 *dwc,
                if (usb_endpoint_xfer_isoc(dep->endpoint.desc)) {
                        dwc3_gadget_start_isoc(dwc, dep, event);
                } else {
-                       int active;
                        int ret;
 
-                       active = event->status & DEPEVT_STATUS_TRANSFER_ACTIVE;
-
-                       dwc3_trace(trace_dwc3_gadget, "%s: reason %s",
-                                       dep->name, active ? "Transfer Active"
-                                       : "Transfer Not Active");
-
                        ret = __dwc3_gadget_kick_transfer(dep, 0);
                        if (!ret || ret == -EBUSY)
                                return;
-
-                       dwc3_trace(trace_dwc3_gadget,
-                                       "%s: failed to kick transfers",
-                                       dep->name);
                }
 
                break;
@@ -2182,26 +2165,9 @@ static void dwc3_endpoint_interrupt(struct dwc3 *dwc,
                                        dep->name);
                        return;
                }
-
-               switch (event->status) {
-               case DEPEVT_STREAMEVT_FOUND:
-                       dwc3_trace(trace_dwc3_gadget,
-                                       "Stream %d found and started",
-                                       event->parameters);
-
-                       break;
-               case DEPEVT_STREAMEVT_NOTFOUND:
-                       /* FALLTHROUGH */
-               default:
-                       dwc3_trace(trace_dwc3_gadget,
-                                       "unable to find suitable stream");
-               }
                break;
        case DWC3_DEPEVT_RXTXFIFOEVT:
-               dwc3_trace(trace_dwc3_gadget, "%s FIFO Overrun", dep->name);
-               break;
        case DWC3_DEPEVT_EPCMDCMPLT:
-               dwc3_trace(trace_dwc3_gadget, "Endpoint Command Complete");
                break;
        }
 }
@@ -2750,16 +2716,9 @@ static void dwc3_gadget_interrupt(struct dwc3 *dwc,
                }
                break;
        case DWC3_DEVICE_EVENT_SOF:
-               dwc3_trace(trace_dwc3_gadget, "Start of Periodic Frame");
-               break;
        case DWC3_DEVICE_EVENT_ERRATIC_ERROR:
-               dwc3_trace(trace_dwc3_gadget, "Erratic Error");
-               break;
        case DWC3_DEVICE_EVENT_CMD_CMPL:
-               dwc3_trace(trace_dwc3_gadget, "Command Complete");
-               break;
        case DWC3_DEVICE_EVENT_OVERFLOW:
-               dwc3_trace(trace_dwc3_gadget, "Overflow");
                break;
        default:
                dev_WARN(dwc->dev, "UNKNOWN IRQ %d\n", event->type);