From a2f656060b88241a22afb5927e433a126f1e151e Mon Sep 17 00:00:00 2001 From: Bin Liu Date: Thu, 24 Aug 2017 11:38:33 -0500 Subject: usb: musb: print an error message when hwep alloc failed Print an error message with qh maxpacket size and hb_mult when hwep allocation failed, so we have a better idea why it is failed. Signed-off-by: Bin Liu Signed-off-by: Greg Kroah-Hartman --- drivers/usb/musb/musb_host.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'drivers/usb/musb/musb_host.c') diff --git a/drivers/usb/musb/musb_host.c b/drivers/usb/musb/musb_host.c index 3344ffd5bb13..605167d81676 100644 --- a/drivers/usb/musb/musb_host.c +++ b/drivers/usb/musb/musb_host.c @@ -2152,6 +2152,10 @@ static int musb_schedule( (USB_SPEED_HIGH == qh->dev->speed) ? 8 : 4; goto success; } else if (best_end < 0) { + dev_err(musb->controller, + "%s hwep alloc failed for %dx%d\n", + musb_ep_xfertype_string(qh->type), + qh->hb_mult, qh->maxpacket); return -ENOSPC; } -- cgit v1.2.3 From 1bff25eafa451c6210d6dfdff63e39c55c96a3e3 Mon Sep 17 00:00:00 2001 From: Bin Liu Date: Thu, 24 Aug 2017 11:38:34 -0500 Subject: usb: musb: print an error message when high bandwidth is unsupported There are multiple places in usb core or controller driver which returns -EMSGSIZE when a class driver queueing urb failed, so the "Message too long" log doesn't help much for understanding the error. Let the musb driver to specifically print a error message when musb_urb_enqueue() returns -EMSGSIZE. Signed-off-by: Bin Liu Signed-off-by: Greg Kroah-Hartman --- drivers/usb/musb/musb_host.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'drivers/usb/musb/musb_host.c') diff --git a/drivers/usb/musb/musb_host.c b/drivers/usb/musb/musb_host.c index 605167d81676..b17450a59882 100644 --- a/drivers/usb/musb/musb_host.c +++ b/drivers/usb/musb/musb_host.c @@ -2248,6 +2248,10 @@ static int musb_urb_enqueue( ok = (usb_pipein(urb->pipe) && musb->hb_iso_rx) || (usb_pipeout(urb->pipe) && musb->hb_iso_tx); if (!ok) { + dev_err(musb->controller, + "high bandwidth %s (%dx%d) not supported\n", + musb_ep_xfertype_string(qh->type), + qh->hb_mult, qh->maxpacket & 0x7ff); ret = -EMSGSIZE; goto done; } -- cgit v1.2.3