Re: [PATCH] usb: gadget: f_midi: Fixed a bug when buflen was smaller than wMaxPacketSize

2016-04-04 Thread Felipe Ferreri Tonello
Hi Balbi, On 04/04/16 11:46, Felipe Balbi wrote: > > Hi, > > Felipe Ferreri Tonello writes: On 30/03/16 13:33, Michal Nazarewicz wrote: > On Wed, Mar 30 2016, Felipe Balbi wrote: >> a USB packet, right. that's correct. But a struct usb_request can >>

Re: [PATCH] usb: gadget: f_midi: Fixed a bug when buflen was smaller than wMaxPacketSize

2016-04-04 Thread Felipe Balbi
Hi, Felipe Ferreri Tonello writes: >>> On 30/03/16 13:33, Michal Nazarewicz wrote: On Wed, Mar 30 2016, Felipe Balbi wrote: > a USB packet, right. that's correct. But a struct usb_request can > point to whatever size buffer it wants and UDC is required to

Re: [PATCH] usb: gadget: f_midi: Fixed a bug when buflen was smaller than wMaxPacketSize

2016-04-01 Thread Felipe Ferreri Tonello
Hi Balbi, On 01/04/16 11:22, Felipe Balbi wrote: > > Hi, > > Felipe Ferreri Tonello writes: >> Hi Balbi and Mina, >> >> On 30/03/16 13:33, Michal Nazarewicz wrote: >>> On Wed, Mar 30 2016, Felipe Balbi wrote: a USB packet, right. that's correct. But a struct

Re: [PATCH] usb: gadget: f_midi: Fixed a bug when buflen was smaller than wMaxPacketSize

2016-04-01 Thread Felipe Balbi
Hi, Felipe Ferreri Tonello writes: > Hi Balbi and Mina, > > On 30/03/16 13:33, Michal Nazarewicz wrote: >> On Wed, Mar 30 2016, Felipe Balbi wrote: >>> a USB packet, right. that's correct. But a struct usb_request can >>> point to whatever size buffer it wants and UDC is

Re: [PATCH] usb: gadget: f_midi: Fixed a bug when buflen was smaller than wMaxPacketSize

2016-04-01 Thread Felipe Ferreri Tonello
Hi Balbi and Mina, On 30/03/16 13:33, Michal Nazarewicz wrote: > On Wed, Mar 30 2016, Felipe Balbi wrote: >> a USB packet, right. that's correct. But a struct usb_request can >> point to whatever size buffer it wants and UDC is required to split >> that into wMaxPacketSize transfers. > > D’oh.

Re: [PATCH] usb: gadget: f_midi: Fixed a bug when buflen was smaller than wMaxPacketSize

2016-03-30 Thread Felipe Balbi
Michal Nazarewicz writes: > [ text/plain ] > On Wed, Mar 09 2016, Felipe F. Tonello wrote: >> buflen by default (256) is smaller than wMaxPacketSize (512) in high-speed >> devices. >> >> That caused the OUT endpoint to freeze if the host send any data packet of >> length

Re: [PATCH] usb: gadget: f_midi: Fixed a bug when buflen was smaller than wMaxPacketSize

2016-03-15 Thread Clemens Ladisch
Felipe Ferreri Tonello wrote: > On 11/03/16 23:07, Michal Nazarewicz wrote: >> I’m also wondering whether it would be beneficial to get rid of buflen >> all together and use wMaxPacketSie for in endpoints as well? Is that >> feasible? > > Yes, we could just remove the buflen parameter. > > The

Re: [PATCH] usb: gadget: f_midi: Fixed a bug when buflen was smaller than wMaxPacketSize

2016-03-14 Thread Felipe Ferreri Tonello
Hi Michal, On 11/03/16 23:07, Michal Nazarewicz wrote: > On Wed, Mar 09 2016, Felipe F. Tonello wrote: >> buflen by default (256) is smaller than wMaxPacketSize (512) in high-speed >> devices. >> >> That caused the OUT endpoint to freeze if the host send any data packet of >> length greater than

Re: [PATCH] usb: gadget: f_midi: Fixed a bug when buflen was smaller than wMaxPacketSize

2016-03-11 Thread Michal Nazarewicz
On Wed, Mar 09 2016, Felipe F. Tonello wrote: > buflen by default (256) is smaller than wMaxPacketSize (512) in high-speed > devices. > > That caused the OUT endpoint to freeze if the host send any data packet of > length greater than 256 bytes. > > This is an example dump of what happended on

Re: [PATCH] usb: gadget: f_midi: Fixed a bug when buflen was smaller than wMaxPacketSize

2016-03-11 Thread Clemens Ladisch
Steve Calfee wrote: > On Wed, Mar 9, 2016 at 11:39 AM, Felipe F. Tonello > wrote: >> [...] >> This patch fixes this problem by setting the minimum usb_request's buffer >> size >> for the OUT endpoint as its wMaxPacketSize. >> >> --- a/drivers/usb/gadget/function/f_midi.c

Re: [PATCH] usb: gadget: f_midi: Fixed a bug when buflen was smaller than wMaxPacketSize

2016-03-10 Thread Steve Calfee
On Thu, Mar 10, 2016 at 1:23 AM, Felipe Ferreri Tonello wrote: >>> --- a/drivers/usb/gadget/function/f_midi.c >>> +++ b/drivers/usb/gadget/function/f_midi.c >>> @@ -366,7 +366,9 @@ static int f_midi_set_alt(struct usb_function *f, >>> unsigned intf, unsigned alt) >>>

Re: [PATCH] usb: gadget: f_midi: Fixed a bug when buflen was smaller than wMaxPacketSize

2016-03-10 Thread Felipe Ferreri Tonello
Hi Steve, On 09/03/16 22:43, Steve Calfee wrote: > On Wed, Mar 9, 2016 at 11:39 AM, Felipe F. Tonello > wrote: >> buflen by default (256) is smaller than wMaxPacketSize (512) in high-speed >> devices. >> >> That caused the OUT endpoint to freeze if the host send any data

Re: [PATCH] usb: gadget: f_midi: Fixed a bug when buflen was smaller than wMaxPacketSize

2016-03-09 Thread Steve Calfee
On Wed, Mar 9, 2016 at 11:39 AM, Felipe F. Tonello wrote: > buflen by default (256) is smaller than wMaxPacketSize (512) in high-speed > devices. > > That caused the OUT endpoint to freeze if the host send any data packet of > length greater than 256 bytes. > > This is an