All of lore.kernel.org
 help / color / mirror / Atom feed
* [V3, PATCH] Increase HID maximum packet size to 16KB.
@ 2020-11-25 22:39 Dean Camera
  2020-11-27 14:45 ` Jiri Kosina
  0 siblings, 1 reply; 2+ messages in thread
From: Dean Camera @ 2020-11-25 22:39 UTC (permalink / raw)
  To: linux-input, jikos, benjamin.tissoires; +Cc: Dean Camera

Currently the maximum HID report size which can be buffered by the
kernel is 8KB. This is sufficient for the vast majority of HID
devices on the market, as most HID reports are fairly small.

However, some unusual devices such as the Elgate Stream Deck exist
which use a report size slightly over 8KB for the image data that
is sent to the device. Reports these large cannot be buffered by
the regular HID subsystem currently, thus the only way to use such
device is to bypass the HID subsystem entirely.

This increases the maximum HID report size to 16KB, which should
cover all sanely designed HID devices.

Signed-off-by: Dean Camera <dean@fourwalledcubicle.com>
---
 include/linux/hid.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/hid.h b/include/linux/hid.h
index 58684657960b..2faa7aba67ed 100644
--- a/include/linux/hid.h
+++ b/include/linux/hid.h
@@ -494,7 +494,7 @@ struct hid_report_enum {
 };
 
 #define HID_MIN_BUFFER_SIZE	64		/* make sure there is at least a packet size of space */
-#define HID_MAX_BUFFER_SIZE	8192		/* 8kb */
+#define HID_MAX_BUFFER_SIZE	16384		/* 16kb */
 #define HID_CONTROL_FIFO_SIZE	256		/* to init devices with >100 reports */
 #define HID_OUTPUT_FIFO_SIZE	64
 
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [V3, PATCH] Increase HID maximum packet size to 16KB.
  2020-11-25 22:39 [V3, PATCH] Increase HID maximum packet size to 16KB Dean Camera
@ 2020-11-27 14:45 ` Jiri Kosina
  0 siblings, 0 replies; 2+ messages in thread
From: Jiri Kosina @ 2020-11-27 14:45 UTC (permalink / raw)
  To: Dean Camera; +Cc: linux-input, benjamin.tissoires

On Thu, 26 Nov 2020, Dean Camera wrote:

> Currently the maximum HID report size which can be buffered by the
> kernel is 8KB. This is sufficient for the vast majority of HID
> devices on the market, as most HID reports are fairly small.
> 
> However, some unusual devices such as the Elgate Stream Deck exist
> which use a report size slightly over 8KB for the image data that
> is sent to the device. Reports these large cannot be buffered by
> the regular HID subsystem currently, thus the only way to use such
> device is to bypass the HID subsystem entirely.
> 
> This increases the maximum HID report size to 16KB, which should
> cover all sanely designed HID devices.

Seeing the evolution of this constant over the course of years really 
reminds me of "640KB should be enough for everybody" :)

Applied, thanks Dean.

-- 
Jiri Kosina
SUSE Labs


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-11-27 14:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-25 22:39 [V3, PATCH] Increase HID maximum packet size to 16KB Dean Camera
2020-11-27 14:45 ` Jiri Kosina

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.