All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jiri Kosina <jikos@kernel.org>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Benjamin Tissoires <benjamin.tissoires@redhat.com>,
	Angela Czubak <acz@semihalf.com>,
	linux-input@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 00/12] i2c-hid: fixes for unnumbered reports and other improvements
Date: Wed, 2 Feb 2022 14:56:32 +0100 (CET)	[thread overview]
Message-ID: <nycvar.YFH.7.76.2202021456020.11721@cbobk.fhfr.pm> (raw)
In-Reply-To: <20220118072628.1617172-1-dmitry.torokhov@gmail.com>

On Mon, 17 Jan 2022, Dmitry Torokhov wrote:

> Hi,
> 
> This series came about after I reviewed Angela's patch that fixed issues
> with incorrect handling of high-numbered reports (15 and above) in
> i2c-hid driver:
> 
> - it appears to me that the driver did not handle unnumbered reports
>   correctly as the kernel internally expects unnumbered reports to be
>   still prepended with report number 0, but i2c_hid_get_raw_report() and
>   i2c_hid_output_raw_report() only expected report ID to be present for
>   numbered reports.
> 
> - the driver tried to consolidate both command handling and sending
>   output reports in __i2c_hid_command() but the rules for different
>   commands vary significantly and because of that the logic was hard to
>   follow and it bled out from __i2c_hid_command() to callers. I decided
>   to introduce a few simple helpers and have the data encoding for
>   individual commands done at the call site. I believe this made it
>   easier to validate the rules and the logic and allowed to remove
>   special handling for the HID descriptor retrieval, among other things.
> 
> - the driver does too many copying of data; encoding the data for
>   commands at the call site allowed to only copy data once into the
>   transfer buffers.
> 
> I tested this on a couple of Chromebooks with i2c-hid touchscreens, but
> it would be great if other folks tried it out as well.

Benjamin,

is this something you could feed into your testing machinery as well? (not 
sure whether it's handling i2c-hid specifics).

Thanks!

-- 
Jiri Kosina
SUSE Labs


  parent reply	other threads:[~2022-02-02 13:56 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-18  7:26 [PATCH 00/12] i2c-hid: fixes for unnumbered reports and other improvements Dmitry Torokhov
2022-01-18  7:26 ` [PATCH 01/12] HID: i2c-hid: fix handling numbered reports with IDs of 15 and above Dmitry Torokhov
2022-01-18  7:26 ` [PATCH 02/12] HID: i2c-hid: fix GET/SET_REPORT for unnumbered reports Dmitry Torokhov
2022-02-03 14:16   ` Benjamin Tissoires
2022-01-18  7:26 ` [PATCH 03/12] HID: i2c-hid: use "struct i2c_hid" as argument in most calls Dmitry Torokhov
2022-01-18  7:26 ` [PATCH 04/12] HID: i2c-hid: refactor reset command Dmitry Torokhov
2022-01-18  7:26 ` [PATCH 05/12] HID: i2c-hid: explicitly code setting and sending reports Dmitry Torokhov
2022-01-19 15:31   ` Angela Czubak
2022-01-20  6:27     ` Dmitry Torokhov
2022-01-18  7:26 ` [PATCH 06/12] HID: i2c-hid: define i2c_hid_read_register() and use it Dmitry Torokhov
2022-01-18  7:26 ` [PATCH 07/12] HID: i2c-hid: create a helper for SET_POWER command Dmitry Torokhov
2022-01-18  7:26 ` [PATCH 08/12] HID: i2c-hid: convert i2c_hid_execute_reset() to use i2c_hid_xfer() Dmitry Torokhov
2022-01-18  7:26 ` [PATCH 09/12] HID: i2c-hid: rework i2c_hid_get_report() " Dmitry Torokhov
2022-01-18  7:26 ` [PATCH 10/12] HID: i2c-hid: use helpers to do endian conversion in i2c_hid_get_input() Dmitry Torokhov
2022-01-18  7:26 ` [PATCH 11/12] HID: i2c-hid: no longer need raw access to HID descriptor structure Dmitry Torokhov
2022-01-18  7:26 ` [PATCH 12/12] HID: i2c-hid: note that I2C xfer buffers are DMA-safe Dmitry Torokhov
2022-02-02 13:56 ` Jiri Kosina [this message]
2022-02-02 17:59   ` [PATCH 00/12] i2c-hid: fixes for unnumbered reports and other improvements Benjamin Tissoires
2022-02-03 14:22     ` Benjamin Tissoires
2022-02-14  9:46       ` Jiri Kosina

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=nycvar.YFH.7.76.2202021456020.11721@cbobk.fhfr.pm \
    --to=jikos@kernel.org \
    --cc=acz@semihalf.com \
    --cc=benjamin.tissoires@redhat.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.