diff options
| author | Petr Beneš <[email protected]> | 2025-12-18 15:27:36 +0100 |
|---|---|---|
| committer | Mattijs Korpershoek <[email protected]> | 2026-01-09 09:24:39 +0100 |
| commit | 8ea70d8132df30c37c9592952c6267c2e9b4e562 (patch) | |
| tree | 9d9fec6e2db69d12446d9ed8766573584e49fe93 | |
| parent | 6a92e9827650797b6b5290621c1831fe32d6ea4b (diff) | |
usb: ci_udc: cosmetics: EP and requests debug info
Make a note in an unexpected situation, e.g. queuing a request
on a disabled endpoint, enabling an enabled endpoint...
Reviewed-by: Mattijs Korpershoek <[email protected]>
Signed-off-by: Petr Beneš <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Mattijs Korpershoek <[email protected]>
| -rw-r--r-- | drivers/usb/gadget/ci_udc.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/usb/gadget/ci_udc.c b/drivers/usb/gadget/ci_udc.c index c8953d48723..046bb335ecb 100644 --- a/drivers/usb/gadget/ci_udc.c +++ b/drivers/usb/gadget/ci_udc.c @@ -273,8 +273,10 @@ ci_ep_alloc_request(struct usb_ep *ep, unsigned int gfp_flags) if (ci_ep->desc) num = ci_ep->desc->bEndpointAddress & USB_ENDPOINT_NUMBER_MASK; - if (num == 0 && controller.ep0_req) + if (num == 0 && controller.ep0_req) { + DBG("%s: already got controller.ep0_req = %p\n", __func__, controller.ep0_req); return &controller.ep0_req->req; + } ci_req = calloc(1, sizeof(*ci_req)); if (!ci_req) @@ -296,6 +298,8 @@ static void ci_ep_free_request(struct usb_ep *ep, struct usb_request *req) if (ci_ep->desc) num = ci_ep->desc->bEndpointAddress & USB_ENDPOINT_NUMBER_MASK; + else + DBG("%s: no endpoint %p descriptor\n", __func__, ci_ep); if (num == 0) { if (!controller.ep0_req) @@ -624,8 +628,10 @@ static int ci_ep_dequeue(struct usb_ep *_ep, struct usb_request *_req) break; } - if (&ci_req->req != _req) + if (&ci_req->req != _req) { + DBG("%s: ci_req not found in the queue\n", __func__); return -EINVAL; + } list_del_init(&ci_req->queue); |
