# Re: Losing events from USB barcode reader

- From: Thadeu Lima de Souza Cascardo \<cascardo@holoscopio.com\>
- Date: 2011-06-03 13:55:02 
- List: linux-input
- Page: https://ratatoskr.run/linux-input/2011/06/8916831
- Thread: https://ratatoskr.run/linux-input/2011/05/8916765/t.md

```text
On Fri, Jun 03, 2011 at 10:15:11AM +0200, Thomas Petazzoni wrote:
> Hello,
> 
> On Wed, 25 May 2011 17:38:32 +0200
> Thomas Petazzoni [ref] wrote:
> 
> > Agreed. However, I don't know on which criteria should the kernel
> > decide what the size of the internal buffer should be, in this
> > particular case.
> 
> Any idea on how to adjust the kernel internal events buffer size for
> this particular device ?
> 

Since v2.6.36, the device may hint the size of the buffer through
input_set_events_per_packet. Perhaps, you could use a QUIRCK or
something like that to indicate that you need a larger buffer and then
use that to set the buffer to a size like 60, which is what is used by
most other uses of this indication. To compare to the minimum default
value, this is 8 input_event's in evdev per event. That is, a hint of 60
will allocate a buffer of 480 entries, instead of 64.

Regards,
Cascardo.

> Thanks!
> 
> Thomas
> -- 
> Thomas Petazzoni, Free Electrons
> Kernel, drivers, real-time and embedded Linux
> development, consulting, training and support.
> http://free-electrons.com
```

## Attachments

- [signature.asc](https://ratatoskr.run/linux-input/2011/06/8916831/attachment/0) (application/pgp-signature, 836 bytes)
