]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
usb: musb: print an error message when high bandwidth is unsupported
authorBin Liu <b-liu@ti.com>
Thu, 24 Aug 2017 16:38:34 +0000 (11:38 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 28 Aug 2017 08:51:55 +0000 (10:51 +0200)
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 <b-liu@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/musb/musb_host.c

index 605167d816760a8bea0d055ea6342e2facd94838..b17450a598826eeb65915f7373fb10fdcd21b03c 100644 (file)
@@ -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;
                }