lkml.org 
[lkml]   [2014]   [Jul]   [18]   [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
On 7/17/2014 8:25 PM, Alan Stern wrote:
> I can't say this is actually wrong, but have you ever encountered a
> situation where this would be needed? How often does anyone need to do
> a multi-packet transfer over an interrupt endpoint?

Honestly, I haven't found any such real device yet. I did this change
while I was going through the code when adding support for interrupt
transfers in gadget zero. I'm a no expert, but the spec says it should
be supported so this code should be added.

However, I messed up a little in this patch. It should have been
---
case USB_ENDPOINT_XFER_ISOC:
allowed |= URB_ISO_ASAP;
break;
+ case USB_ENDPOINT_XFER_INT:
+ if (is_out)
+ allowed |= URB_ZERO_PACKET;
+ else
+ allowed |= URB_SHORT_NOT_OK;
+ break;
}
allowed &= urb->transfer_flags;

---
Otherwise, it sets zero packet flag for control out transfers too.

I'll send a V2 with this change if you agree to setting of the zero
packet flag for interrupt transfers.

Regards
Amit Virdi


\
 
 \ /
  Last update: 2014-07-18 15:01    [W:0.161 / U:0.752 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site