Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1366123
| From | Felipe Balbi <balbi@kernel.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v2] usb: gadget: f_midi: fixed a bug when buflen was smaller than wMaxPacketSize |
| Date | 2016-03-29 12:40 +0200 |
| Message-ID | <rhZe2-4MC-11@gated-at.bofh.it> (permalink) |
| References | <rfUsa-6E2-27@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
[Multipart message — attachments visible in raw view] - view raw
Hi, "Felipe F. Tonello" <eu@felipetonello.com> writes: > [ text/plain ] > 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 that enpoint: > HOST: [DATA][Length=260][...] > DEVICE: [NAK] > HOST: [PING] > DEVICE: [NAK] > HOST: [PING] > DEVICE: [NAK] > ... > HOST: [PING] > DEVICE: [NAK] > > Users should not change the buffer size to anything other than wMaxPacketSize > because that can cause bugs (this bug) or performance issues. Thus, this patch > fixes this problem by eliminating buflen entirely and replacing it with > wMaxPacketSize of the appropriate endpoint where needed. > > Signed-off-by: Felipe F. Tonello <eu@felipetonello.com> > --- > > v2: > - Removed buflen sounds like removing buflen should be delyed to v4.7 merge window while the fix is, indeed, needed. Can you drop the removal of buflen ? I guess it's mostly about picking v1 and fixing endianess problems ? -- balbi
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH v2] usb: gadget: f_midi: fixed a bug when buflen was smaller than wMaxPacketSize "Felipe F. Tonello" <eu@felipetonello.com> - 2016-03-23 18:10 +0100 Re: [PATCH v2] usb: gadget: f_midi: fixed a bug when buflen was smaller than wMaxPacketSize Michal Nazarewicz <mina86@mina86.com> - 2016-03-28 16:50 +0200 Re: [PATCH v2] usb: gadget: f_midi: fixed a bug when buflen was smaller than wMaxPacketSize Felipe Balbi <balbi@kernel.org> - 2016-03-29 12:40 +0200
csiph-web