On Mon, Apr 20, 2015 at 03:11:16PM -0700, Dmitry Torokhov wrote:
> The hardware is limited to 2^9 - 1 (511) bytes transfers, and current
> driver has no protections in case users attempt to do larger transfers.
> The code will just stomp over status register and mayhem ensues.

Interesting. The spec says supports "0 to 256 byte" transfers in the
introduction, but the register just says bits 16:24 are a byte counter
without the extra limitation. I suspect the introductory blurb is
inaccurate and it is implementated as a simple counter as demonstrated
here. We should get that clarified in the specs just in case it was once
limited to 256 bytes.

> Let's split larger transfers into digestable chunks. Doing this allows
> Atmel MXT driver on Pixel 1 function properly (it hasn't since commit
> 9d8dc3e529a19e427fd379118acd132520935c5d "Input: atmel_mxt_ts -
> implement T44 message handling" which tries to consume multiple
> touchscreen/touchpad reports in a single transaction).
> 
> Signed-off-by: Dmitry Torokhov <dmitry.torokhov at gmail.com>

The code looks good and I've only whitespace and variable scoping
gripes, so
Reviewed-by: Chris Wilson <chris at chris-wilson.co.uk>

Though I am tempted to say we should impose the 256 byte limit for
stable@
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre

Reply via email to