usb: dwc3: gadget: purge dev_dbg() calls
authorFelipe Balbi <balbi@ti.com>
Mon, 16 Nov 2015 22:04:13 +0000 (16:04 -0600)
committerFelipe Balbi <balbi@ti.com>
Tue, 15 Dec 2015 15:12:41 +0000 (09:12 -0600)
The last few dev_dbg() messages are converted to
tracepoints and we can finally ignore dev_dbg()
messages during debug sessions.

Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/dwc3/gadget.c

index 98fb8028c792a2e7028f5d36eb170d4cc471a900..ca06ab8e2e4e582a5f1e973facd9f2e8be9239a4 100644 (file)
@@ -265,9 +265,6 @@ void dwc3_gadget_giveback(struct dwc3_ep *dep, struct dwc3_request *req,
                usb_gadget_unmap_request(&dwc->gadget, &req->request,
                                req->direction);
 
-       dev_dbg(dwc->dev, "request %p from %s completed %d/%d ===> %d\n",
-                       req, dep->name, req->request.actual,
-                       req->request.length, status);
        trace_dwc3_gadget_giveback(req);
 
        spin_unlock(&dwc->lock);
@@ -985,8 +982,6 @@ static int __dwc3_gadget_kick_transfer(struct dwc3_ep *dep, u16 cmd_param,
        cmd |= DWC3_DEPCMD_PARAM(cmd_param);
        ret = dwc3_send_gadget_ep_cmd(dwc, dep->number, cmd, &params);
        if (ret < 0) {
-               dev_dbg(dwc->dev, "failed to send STARTTRANSFER command\n");
-
                /*
                 * FIXME we need to iterate over the list of requests
                 * here and stop, unmap, free and del each of the linked
@@ -1045,13 +1040,16 @@ static int __dwc3_gadget_ep_queue(struct dwc3_ep *dep, struct dwc3_request *req)
        int                     ret;
 
        if (!dep->endpoint.desc) {
-               dev_dbg(dwc->dev, "trying to queue request %p to disabled %s\n",
+               dwc3_trace(trace_dwc3_gadget,
+                               "trying to queue request %p to disabled %s\n",
                                &req->request, dep->endpoint.name);
                return -ESHUTDOWN;
        }
 
        if (WARN(req->dep != dep, "request %p belongs to '%s'\n",
                                &req->request, req->dep->name)) {
+               dwc3_trace(trace_dwc3_gadget, "request %p belongs to '%s'\n",
+                               &req->request, req->dep->name);
                return -EINVAL;
        }
 
@@ -1152,7 +1150,8 @@ static int __dwc3_gadget_ep_queue(struct dwc3_ep *dep, struct dwc3_request *req)
 
 out:
        if (ret && ret != -EBUSY)
-               dev_dbg(dwc->dev, "%s: failed to kick transfers\n",
+               dwc3_trace(trace_dwc3_gadget,
+                               "%s: failed to kick transfers\n",
                                dep->name);
        if (ret == -EBUSY)
                ret = 0;
@@ -1242,7 +1241,8 @@ int __dwc3_gadget_ep_set_halt(struct dwc3_ep *dep, int value, int protocol)
                if (!protocol && ((dep->direction && dep->flags & DWC3_EP_BUSY) ||
                                (!list_empty(&dep->req_queued) ||
                                 !list_empty(&dep->request_list)))) {
-                       dev_dbg(dwc->dev, "%s: pending request, cannot halt\n",
+                       dwc3_trace(trace_dwc3_gadget,
+                                       "%s: pending request, cannot halt\n",
                                        dep->name);
                        return -EAGAIN;
                }
@@ -1369,7 +1369,7 @@ static int dwc3_gadget_wakeup(struct usb_gadget *g)
 
        speed = reg & DWC3_DSTS_CONNECTSPD;
        if (speed == DWC3_DSTS_SUPERSPEED) {
-               dev_dbg(dwc->dev, "no wakeup on SuperSpeed\n");
+               dwc3_trace(trace_dwc3_gadget, "no wakeup on SuperSpeed\n");
                ret = -EINVAL;
                goto out;
        }
@@ -1381,8 +1381,9 @@ static int dwc3_gadget_wakeup(struct usb_gadget *g)
        case DWC3_LINK_STATE_U3:        /* in HS, means SUSPEND */
                break;
        default:
-               dev_dbg(dwc->dev, "can't wakeup from link state %d\n",
-                               link_state);
+               dwc3_trace(trace_dwc3_gadget,
+                               "can't wakeup from '%s'\n",
+                               dwc3_gadget_link_string(link_state));
                ret = -EINVAL;
                goto out;
        }
@@ -1821,7 +1822,8 @@ static int __dwc3_cleanup_done_trbs(struct dwc3 *dwc, struct dwc3_ep *dep,
                if (count) {
                        trb_status = DWC3_TRB_SIZE_TRBSTS(trb->size);
                        if (trb_status == DWC3_TRBSTS_MISSED_ISOC) {
-                               dev_dbg(dwc->dev, "incomplete IN transfer %s\n",
+                               dwc3_trace(trace_dwc3_gadget,
+                                               "%s: incomplete IN transfer\n",
                                                dep->name);
                                /*
                                 * If missed isoc occurred and there is
@@ -2000,7 +2002,8 @@ static void dwc3_endpoint_interrupt(struct dwc3 *dwc,
                dep->resource_index = 0;
 
                if (usb_endpoint_xfer_isoc(dep->endpoint.desc)) {
-                       dev_dbg(dwc->dev, "%s is an Isochronous endpoint\n",
+                       dwc3_trace(trace_dwc3_gadget,
+                                       "%s is an Isochronous endpoint\n",
                                        dep->name);
                        return;
                }
@@ -2027,7 +2030,8 @@ static void dwc3_endpoint_interrupt(struct dwc3 *dwc,
                        if (!ret || ret == -EBUSY)
                                return;
 
-                       dev_dbg(dwc->dev, "%s: failed to kick transfers\n",
+                       dwc3_trace(trace_dwc3_gadget,
+                                       "%s: failed to kick transfers\n",
                                        dep->name);
                }
 
@@ -2049,11 +2053,12 @@ static void dwc3_endpoint_interrupt(struct dwc3 *dwc,
                case DEPEVT_STREAMEVT_NOTFOUND:
                        /* FALLTHROUGH */
                default:
-                       dev_dbg(dwc->dev, "Couldn't find suitable stream\n");
+                       dwc3_trace(trace_dwc3_gadget,
+                                       "unable to find suitable stream\n");
                }
                break;
        case DWC3_DEPEVT_RXTXFIFOEVT:
-               dev_dbg(dwc->dev, "%s FIFO Overrun\n", dep->name);
+               dwc3_trace(trace_dwc3_gadget, "%s FIFO Overrun\n", dep->name);
                break;
        case DWC3_DEPEVT_EPCMDCMPLT:
                dwc3_trace(trace_dwc3_gadget, "Endpoint Command Complete");