lkml.org 
[lkml]   [2014]   [Jul]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH] usb: core: allow zero packet flag for interrupt urbs
    Hi,

    On 07/17/2014 10:47 AM, Amit Virdi wrote:
    > Section 4.4.7.2 of the USB3.0 spec says:
    > A zero-length data payload is a valid transfer and may be useful for
    > some implementations.
    >
    > So, extend the logic of allowing URB_ZERO_PACKET to interrupt urbs too.
    > Otherwise, the kernel throws error of BOGUS transfer flags.
    >
    > Signed-off-by: Amit Virdi <amit.virdi@st.com>

    Seems sensible to me:

    Acked-by: Hans de Goede <hdegoede@redhat.com>

    Regards,

    Hans


    > ---
    > drivers/usb/core/urb.c | 4 ++++
    > 1 file changed, 4 insertions(+)
    >
    > diff --git a/drivers/usb/core/urb.c b/drivers/usb/core/urb.c
    > index 991386c..a136246 100644
    > --- a/drivers/usb/core/urb.c
    > +++ b/drivers/usb/core/urb.c
    > @@ -460,6 +460,10 @@ int usb_submit_urb(struct urb *urb, gfp_t mem_flags)
    > case USB_ENDPOINT_XFER_CONTROL:
    > allowed |= URB_NO_FSBR; /* only affects UHCI */
    > /* FALLTHROUGH */
    > + case USB_ENDPOINT_XFER_INT:
    > + if (is_out)
    > + allowed |= URB_ZERO_PACKET;
    > + /* FALLTHROUGH */
    > default: /* all non-iso endpoints */
    > if (!is_out)
    > allowed |= URB_SHORT_NOT_OK;
    >


    \
     
     \ /
      Last update: 2014-07-17 13:21    [W:4.077 / U:0.092 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site