|
@@ -874,10 +874,10 @@ static int musb_gadget_enable(struct usb_ep *ep,
|
|
|
status = -EBUSY;
|
|
|
goto fail;
|
|
|
}
|
|
|
- musb_ep->type = desc->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK;
|
|
|
+ musb_ep->type = usb_endpoint_type(desc);
|
|
|
|
|
|
/* check direction and (later) maxpacket size against endpoint */
|
|
|
- if ((desc->bEndpointAddress & USB_ENDPOINT_NUMBER_MASK) != epnum)
|
|
|
+ if (usb_endpoint_num(desc) != epnum)
|
|
|
goto fail;
|
|
|
|
|
|
/* REVISIT this rules out high bandwidth periodic transfers */
|
|
@@ -890,7 +890,7 @@ static int musb_gadget_enable(struct usb_ep *ep,
|
|
|
* packet size (or fail), set the mode, clear the fifo
|
|
|
*/
|
|
|
musb_ep_select(mbase, epnum);
|
|
|
- if (desc->bEndpointAddress & USB_DIR_IN) {
|
|
|
+ if (usb_endpoint_dir_in(desc)) {
|
|
|
u16 int_txe = musb_readw(mbase, MUSB_INTRTXE);
|
|
|
|
|
|
if (hw_ep->is_shared_fifo)
|