]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/usb/musb/musb_gadget.c
Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux...
[karo-tx-linux.git] / drivers / usb / musb / musb_gadget.c
index a55173c9e5645d6f5245c0ff78c4ccf151d75107..1acc4864f9f6f0bf52cb5a084475fdab13bbab07 100644 (file)
@@ -974,8 +974,8 @@ static int musb_gadget_enable(struct usb_ep *ep,
                goto fail;
 
        /* REVISIT this rules out high bandwidth periodic transfers */
-       tmp = usb_endpoint_maxp(desc);
-       if (tmp & ~0x07ff) {
+       tmp = usb_endpoint_maxp_mult(desc) - 1;
+       if (tmp) {
                int ok;
 
                if (usb_endpoint_dir_in(desc))
@@ -987,12 +987,12 @@ static int musb_gadget_enable(struct usb_ep *ep,
                        musb_dbg(musb, "no support for high bandwidth ISO");
                        goto fail;
                }
-               musb_ep->hb_mult = (tmp >> 11) & 3;
+               musb_ep->hb_mult = tmp;
        } else {
                musb_ep->hb_mult = 0;
        }
 
-       musb_ep->packet_sz = tmp & 0x7ff;
+       musb_ep->packet_sz = usb_endpoint_maxp(desc);
        tmp = musb_ep->packet_sz * (musb_ep->hb_mult + 1);
 
        /* enable the interrupts for the endpoint, set the endpoint