Re: [PATCH] usb: gadget: f_midi: Add checking if it need align buffer's size to an ep's maxpacketsize

2016-07-10 Thread Baolin Wang
On 8 July 2016 at 21:04, Michal Nazarewicz wrote: > On Fri, Jul 08 2016, Baolin Wang wrote: >> On 7 July 2016 at 20:51, Michal Nazarewicz wrote: >>> On Thu, Jul 07 2016, Baolin Wang wrote: Some gadget device (such as dwc3 gadget) requires

Re: [PATCH] usb: gadget: f_midi: Add checking if it need align buffer's size to an ep's maxpacketsize

2016-07-10 Thread Baolin Wang
On 8 July 2016 at 21:04, Michal Nazarewicz wrote: > On Fri, Jul 08 2016, Baolin Wang wrote: >> On 7 July 2016 at 20:51, Michal Nazarewicz wrote: >>> On Thu, Jul 07 2016, Baolin Wang wrote: Some gadget device (such as dwc3 gadget) requires quirk_ep_out_aligned_size attribute, which

Re: [PATCH] usb: gadget: f_midi: Add checking if it need align buffer's size to an ep's maxpacketsize

2016-07-10 Thread Baolin Wang
On 8 July 2016 at 21:27, Felipe Balbi wrote: > > Hi again, > > Felipe Balbi writes: >> Michal Nazarewicz writes: >>> On Fri, Jul 08 2016, Baolin Wang wrote: On 7 July 2016 at 20:51, Michal Nazarewicz wrote: > On

Re: [PATCH] usb: gadget: f_midi: Add checking if it need align buffer's size to an ep's maxpacketsize

2016-07-10 Thread Baolin Wang
On 8 July 2016 at 21:27, Felipe Balbi wrote: > > Hi again, > > Felipe Balbi writes: >> Michal Nazarewicz writes: >>> On Fri, Jul 08 2016, Baolin Wang wrote: On 7 July 2016 at 20:51, Michal Nazarewicz wrote: > On Thu, Jul 07 2016, Baolin Wang wrote: >> Some gadget device (such as

Re: [PATCH] usb: gadget: f_midi: Add checking if it need align buffer's size to an ep's maxpacketsize

2016-07-10 Thread Baolin Wang
On 8 July 2016 at 21:21, Felipe Balbi wrote: > > Hi, > > Baolin Wang writes: >> Some gadget device (such as dwc3 gadget) requires quirk_ep_out_aligned_size >> attribute, which means it need to align the request buffer's size to an ep's >> maxpacketsize.

Re: [PATCH] usb: gadget: f_midi: Add checking if it need align buffer's size to an ep's maxpacketsize

2016-07-10 Thread Baolin Wang
On 8 July 2016 at 21:21, Felipe Balbi wrote: > > Hi, > > Baolin Wang writes: >> Some gadget device (such as dwc3 gadget) requires quirk_ep_out_aligned_size >> attribute, which means it need to align the request buffer's size to an ep's >> maxpacketsize. >> >> Thus we add usb_ep_align_maybe()

Re: [PATCH] usb: gadget: f_midi: Add checking if it need align buffer's size to an ep's maxpacketsize

2016-07-08 Thread Michal Nazarewicz
On Fri, Jul 08 2016, Felipe Balbi wrote: > My take on this is that it's calling max_t() to try and align to > wMaxPacketSize. We can see from original commit what was the intent: > > commit 03d27ade4941076b34c823d63d91dc895731a595 > Author: Felipe F. Tonello > Date: Wed

Re: [PATCH] usb: gadget: f_midi: Add checking if it need align buffer's size to an ep's maxpacketsize

2016-07-08 Thread Michal Nazarewicz
On Fri, Jul 08 2016, Felipe Balbi wrote: > My take on this is that it's calling max_t() to try and align to > wMaxPacketSize. We can see from original commit what was the intent: > > commit 03d27ade4941076b34c823d63d91dc895731a595 > Author: Felipe F. Tonello > Date: Wed Mar 9 19:39:30 2016

Re: [PATCH] usb: gadget: f_midi: Add checking if it need align buffer's size to an ep's maxpacketsize

2016-07-08 Thread Michal Nazarewicz
> Baolin Wang writes: >> @@ -359,10 +361,12 @@ static int f_midi_set_alt(struct usb_function *f, >> unsigned intf, unsigned alt) >> >> /* allocate a bunch of read buffers and queue them all at once. */ >> for (i = 0; i < midi->qlen && err == 0; i++) { >> -

Re: [PATCH] usb: gadget: f_midi: Add checking if it need align buffer's size to an ep's maxpacketsize

2016-07-08 Thread Michal Nazarewicz
> Baolin Wang writes: >> @@ -359,10 +361,12 @@ static int f_midi_set_alt(struct usb_function *f, >> unsigned intf, unsigned alt) >> >> /* allocate a bunch of read buffers and queue them all at once. */ >> for (i = 0; i < midi->qlen && err == 0; i++) { >> -struct

Re: [PATCH] usb: gadget: f_midi: Add checking if it need align buffer's size to an ep's maxpacketsize

2016-07-08 Thread Felipe Balbi
Hi again, Felipe Balbi writes: > Michal Nazarewicz writes: >> On Fri, Jul 08 2016, Baolin Wang wrote: >>> On 7 July 2016 at 20:51, Michal Nazarewicz wrote: On Thu, Jul 07 2016, Baolin Wang wrote: > Some gadget device (such as

Re: [PATCH] usb: gadget: f_midi: Add checking if it need align buffer's size to an ep's maxpacketsize

2016-07-08 Thread Felipe Balbi
Hi again, Felipe Balbi writes: > Michal Nazarewicz writes: >> On Fri, Jul 08 2016, Baolin Wang wrote: >>> On 7 July 2016 at 20:51, Michal Nazarewicz wrote: On Thu, Jul 07 2016, Baolin Wang wrote: > Some gadget device (such as dwc3 gadget) requires > quirk_ep_out_aligned_size

Re: [PATCH] usb: gadget: f_midi: Add checking if it need align buffer's size to an ep's maxpacketsize

2016-07-08 Thread Felipe Balbi
Hi, Michal Nazarewicz writes: > On Fri, Jul 08 2016, Baolin Wang wrote: >> On 7 July 2016 at 20:51, Michal Nazarewicz wrote: >>> On Thu, Jul 07 2016, Baolin Wang wrote: Some gadget device (such as dwc3 gadget) requires quirk_ep_out_aligned_size

Re: [PATCH] usb: gadget: f_midi: Add checking if it need align buffer's size to an ep's maxpacketsize

2016-07-08 Thread Felipe Balbi
Hi, Michal Nazarewicz writes: > On Fri, Jul 08 2016, Baolin Wang wrote: >> On 7 July 2016 at 20:51, Michal Nazarewicz wrote: >>> On Thu, Jul 07 2016, Baolin Wang wrote: Some gadget device (such as dwc3 gadget) requires quirk_ep_out_aligned_size attribute, which means it need to align

Re: [PATCH] usb: gadget: f_midi: Add checking if it need align buffer's size to an ep's maxpacketsize

2016-07-08 Thread Felipe Balbi
Hi, Baolin Wang writes: > Some gadget device (such as dwc3 gadget) requires quirk_ep_out_aligned_size > attribute, which means it need to align the request buffer's size to an ep's > maxpacketsize. > > Thus we add usb_ep_align_maybe() function to check if it is need to

Re: [PATCH] usb: gadget: f_midi: Add checking if it need align buffer's size to an ep's maxpacketsize

2016-07-08 Thread Felipe Balbi
Hi, Baolin Wang writes: > Some gadget device (such as dwc3 gadget) requires quirk_ep_out_aligned_size > attribute, which means it need to align the request buffer's size to an ep's > maxpacketsize. > > Thus we add usb_ep_align_maybe() function to check if it is need to align > the request

Re: [PATCH] usb: gadget: f_midi: Add checking if it need align buffer's size to an ep's maxpacketsize

2016-07-08 Thread Michal Nazarewicz
On Fri, Jul 08 2016, Baolin Wang wrote: > On 7 July 2016 at 20:51, Michal Nazarewicz wrote: >> On Thu, Jul 07 2016, Baolin Wang wrote: >>> Some gadget device (such as dwc3 gadget) requires quirk_ep_out_aligned_size >>> attribute, which means it need to align the request

Re: [PATCH] usb: gadget: f_midi: Add checking if it need align buffer's size to an ep's maxpacketsize

2016-07-08 Thread Michal Nazarewicz
On Fri, Jul 08 2016, Baolin Wang wrote: > On 7 July 2016 at 20:51, Michal Nazarewicz wrote: >> On Thu, Jul 07 2016, Baolin Wang wrote: >>> Some gadget device (such as dwc3 gadget) requires quirk_ep_out_aligned_size >>> attribute, which means it need to align the request buffer's size to an ep's

Re: [PATCH] usb: gadget: f_midi: Add checking if it need align buffer's size to an ep's maxpacketsize

2016-07-07 Thread Baolin Wang
On 7 July 2016 at 20:51, Michal Nazarewicz wrote: > On Thu, Jul 07 2016, Baolin Wang wrote: >> Some gadget device (such as dwc3 gadget) requires quirk_ep_out_aligned_size >> attribute, which means it need to align the request buffer's size to an ep's >> maxpacketsize. >> >>

Re: [PATCH] usb: gadget: f_midi: Add checking if it need align buffer's size to an ep's maxpacketsize

2016-07-07 Thread Baolin Wang
On 7 July 2016 at 20:51, Michal Nazarewicz wrote: > On Thu, Jul 07 2016, Baolin Wang wrote: >> Some gadget device (such as dwc3 gadget) requires quirk_ep_out_aligned_size >> attribute, which means it need to align the request buffer's size to an ep's >> maxpacketsize. >> >> Thus we add

Re: [PATCH] usb: gadget: f_midi: Add checking if it need align buffer's size to an ep's maxpacketsize

2016-07-07 Thread Michal Nazarewicz
On Thu, Jul 07 2016, Baolin Wang wrote: > Some gadget device (such as dwc3 gadget) requires quirk_ep_out_aligned_size > attribute, which means it need to align the request buffer's size to an ep's > maxpacketsize. > > Thus we add usb_ep_align_maybe() function to check if it is need to align > the

Re: [PATCH] usb: gadget: f_midi: Add checking if it need align buffer's size to an ep's maxpacketsize

2016-07-07 Thread Michal Nazarewicz
On Thu, Jul 07 2016, Baolin Wang wrote: > Some gadget device (such as dwc3 gadget) requires quirk_ep_out_aligned_size > attribute, which means it need to align the request buffer's size to an ep's > maxpacketsize. > > Thus we add usb_ep_align_maybe() function to check if it is need to align > the

[PATCH] usb: gadget: f_midi: Add checking if it need align buffer's size to an ep's maxpacketsize

2016-07-07 Thread Baolin Wang
Some gadget device (such as dwc3 gadget) requires quirk_ep_out_aligned_size attribute, which means it need to align the request buffer's size to an ep's maxpacketsize. Thus we add usb_ep_align_maybe() function to check if it is need to align the request buffer's size to an ep's maxpacketsize.

[PATCH] usb: gadget: f_midi: Add checking if it need align buffer's size to an ep's maxpacketsize

2016-07-07 Thread Baolin Wang
Some gadget device (such as dwc3 gadget) requires quirk_ep_out_aligned_size attribute, which means it need to align the request buffer's size to an ep's maxpacketsize. Thus we add usb_ep_align_maybe() function to check if it is need to align the request buffer's size to an ep's maxpacketsize.