Re: [PATCH] usb: core: allow zero packet flag for interrupt urbs

2014-07-20 Thread Amit Virdi
On 7/18/2014 8:09 PM, Alan Stern wrote: On Fri, 18 Jul 2014, Amit Virdi wrote: 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 int

Re: [PATCH] usb: core: allow zero packet flag for interrupt urbs

2014-07-18 Thread Alan Stern
On Fri, 18 Jul 2014, Amit Virdi wrote: > 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

Re: [PATCH] usb: core: allow zero packet flag for interrupt urbs

2014-07-18 Thread Alan Stern
On Thu, 17 Jul 2014, Steve Calfee wrote: > Hi Alan, > > It has been a few years since I was doing this, but here is my > understanding. If a device descriptor says x bytes should be reserved > (1 to 3072), the host will allocate that much bandwidth. If the sender > sends some number of bytes betw

Re: [PATCH] usb: core: allow zero packet flag for interrupt urbs

2014-07-18 Thread Amit Virdi
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

Re: [PATCH] usb: core: allow zero packet flag for interrupt urbs

2014-07-17 Thread Steve Calfee
On Thu, Jul 17, 2014 at 12:32 PM, Alan Stern wrote: > On Thu, 17 Jul 2014, Steve Calfee wrote: > >> Hi Alan, >> >> I did some testing with multi interrupt transfers some time ago. You >> can get allocated a guaranteed 3x1024 time slot per uframe for an >> interval of your choice on usb 2.0. So zlp

Re: [PATCH] usb: core: allow zero packet flag for interrupt urbs

2014-07-17 Thread Alan Stern
On Thu, 17 Jul 2014, Steve Calfee wrote: > On Thu, Jul 17, 2014 at 7:55 AM, 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 endpo

Re: [PATCH] usb: core: allow zero packet flag for interrupt urbs

2014-07-17 Thread Steve Calfee
On Thu, Jul 17, 2014 at 7:55 AM, 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? > Hi Alan, I did some testing with multi inter

Re: [PATCH] usb: core: allow zero packet flag for interrupt urbs

2014-07-17 Thread Alan Stern
On Thu, 17 Jul 2014, 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 e

Re: [PATCH] usb: core: allow zero packet flag for interrupt urbs

2014-07-17 Thread Hans de Goede
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 t

[PATCH] usb: core: allow zero packet flag for interrupt urbs

2014-07-17 Thread Amit Virdi
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: Am