Message ID | 1321926945-8182-1-git-send-email-peter.chen@freescale.com (mailing list archive) |
---|---|
State | Not Applicable |
Delegated to: | Kumar Gala |
Headers | show |
On Tue, 22 Nov 2011 02:55:45 +0100, Peter Chen <peter.chen@freescale.com> wrote: > Some ISO gadgets, like audio, has SYNC attribute as well as > USB_ENDPOINT_XFER_ISOC for their bmAttributes at ISO endpoint > descriptor. So, it needs to use usb_endpoint_xfer_isoc to judge > ISO XFER. > > Signed-off-by: Peter Chen <peter.chen@freescale.com> Acked-by: Michal Nazarewicz <mina86@mina86.com> > @@ -877,7 +877,7 @@ fsl_ep_queue(struct usb_ep *_ep, struct usb_request *_req, gfp_t gfp_flags) > VDBG("%s, bad ep", __func__); > return -EINVAL; > } > - if (ep->desc->bmAttributes == USB_ENDPOINT_XFER_ISOC) { > + if (usb_endpoint_xfer_isoc(ep->desc)) { > if (req->req.length > ep->ep.maxpacket) > return -EMSGSIZE; > } > @@ -1032,7 +1032,7 @@ static int fsl_ep_set_halt(struct usb_ep *_ep, int value) > goto out; > } >- if (ep->desc->bmAttributes == USB_ENDPOINT_XFER_ISOC) { > + if (usb_endpoint_xfer_isoc(ep->desc)) { > status = -EOPNOTSUPP; > goto out; > }
> Subject: [PATCH v2] USB: fsl_udc_core: use usb_endpoint_xfer_isoc to judge ISO > XFER > > Some ISO gadgets, like audio, has SYNC attribute as well as > USB_ENDPOINT_XFER_ISOC for their bmAttributes at ISO endpoint descriptor. So, it > needs to use usb_endpoint_xfer_isoc to judge ISO XFER. > > Signed-off-by: Peter Chen <peter.chen@freescale.com> Acked-by: Li Yang <leoli@freescale.com> - Leo
On Tue, Nov 22, 2011 at 09:55:45AM +0800, Peter Chen wrote: > Some ISO gadgets, like audio, has SYNC attribute as well as > USB_ENDPOINT_XFER_ISOC for their bmAttributes at ISO endpoint > descriptor. So, it needs to use usb_endpoint_xfer_isoc to judge > ISO XFER. > > Signed-off-by: Peter Chen <peter.chen@freescale.com> applied, thanks
diff --git a/drivers/usb/gadget/fsl_udc_core.c b/drivers/usb/gadget/fsl_udc_core.c index d786ba3..91df255 100644 --- a/drivers/usb/gadget/fsl_udc_core.c +++ b/drivers/usb/gadget/fsl_udc_core.c @@ -877,7 +877,7 @@ fsl_ep_queue(struct usb_ep *_ep, struct usb_request *_req, gfp_t gfp_flags) VDBG("%s, bad ep", __func__); return -EINVAL; } - if (ep->desc->bmAttributes == USB_ENDPOINT_XFER_ISOC) { + if (usb_endpoint_xfer_isoc(ep->desc)) { if (req->req.length > ep->ep.maxpacket) return -EMSGSIZE; } @@ -1032,7 +1032,7 @@ static int fsl_ep_set_halt(struct usb_ep *_ep, int value) goto out; } - if (ep->desc->bmAttributes == USB_ENDPOINT_XFER_ISOC) { + if (usb_endpoint_xfer_isoc(ep->desc)) { status = -EOPNOTSUPP; goto out; }
Some ISO gadgets, like audio, has SYNC attribute as well as USB_ENDPOINT_XFER_ISOC for their bmAttributes at ISO endpoint descriptor. So, it needs to use usb_endpoint_xfer_isoc to judge ISO XFER. Signed-off-by: Peter Chen <peter.chen@freescale.com> --- drivers/usb/gadget/fsl_udc_core.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)