Commit cca1754c authored by Benjamin Herrenschmidt's avatar Benjamin Herrenschmidt Committed by Felipe Balbi

usb: gadget: aspeed: Improve debugging when nuking

When nuking requests, it's useful to display how many were
actually nuked. It has proven handy when debugging issues
where EP0 went in a wrong state.
Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
parent 80167598
...@@ -65,14 +65,16 @@ void ast_vhub_done(struct ast_vhub_ep *ep, struct ast_vhub_req *req, ...@@ -65,14 +65,16 @@ void ast_vhub_done(struct ast_vhub_ep *ep, struct ast_vhub_req *req,
void ast_vhub_nuke(struct ast_vhub_ep *ep, int status) void ast_vhub_nuke(struct ast_vhub_ep *ep, int status)
{ {
struct ast_vhub_req *req; struct ast_vhub_req *req;
int count = 0;
EPDBG(ep, "Nuking\n");
/* Beware, lock will be dropped & req-acquired by done() */ /* Beware, lock will be dropped & req-acquired by done() */
while (!list_empty(&ep->queue)) { while (!list_empty(&ep->queue)) {
req = list_first_entry(&ep->queue, struct ast_vhub_req, queue); req = list_first_entry(&ep->queue, struct ast_vhub_req, queue);
ast_vhub_done(ep, req, status); ast_vhub_done(ep, req, status);
count++;
} }
if (count)
EPDBG(ep, "Nuked %d request(s)\n", count);
} }
struct usb_request *ast_vhub_alloc_request(struct usb_ep *u_ep, struct usb_request *ast_vhub_alloc_request(struct usb_ep *u_ep,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment