From: Guenter Roeck <linux@roeck-us.net>
To: Aleksandr Mezin <mezin.alexander@gmail.com>
Cc: Marius Zachmann <mail@mariuszachmann.de>, linux-hwmon@vger.kernel.org
Subject: Re: corsair-cpro and hidraw
Date: Thu, 17 Jun 2021 06:14:02 -0700 [thread overview]
Message-ID: <20210617131402.GB59767@roeck-us.net> (raw)
In-Reply-To: <CADnvcfK1EzyXY83wd7CJYpZ=S9+KnT0ftF9CiYhJScBGXKmm5A@mail.gmail.com>
On Thu, Jun 17, 2021 at 01:11:38PM +0600, Aleksandr Mezin wrote:
> On Thu, Jun 17, 2021 at 12:27 PM Marius Zachmann <mail@mariuszachmann.de> wrote:
> ...
> > I do not know, what your device is doing
>
> Actually, NZXT devices (at least grid/"smart device" and "smart device
> v2"/rgb&fan controller) don't have such issues - they use report ids,
> and don't even expect request-reply communication pattern. I've just
> noticed that something seems to be wrong with corsair-cpro (but
> somehow didn't notice the comment) and decided to ask.
>
> > This device uses an echo of the command
> > in the answer and if they don't match it returns an error. This could
> > maybe lead to a false error when the replies are switched, but is
> > probably preferable.
>
> Hm... If the response includes the id of the request, it should be
> possible to filter reports in raw_event, i. e. don't signal completion
> if the report doesn't match, and wait more. Yes, there is a corner
> case, "if a command is not supported, the length value in the reply is
> okay, but the command value is set to 0". But timing out (250 ms) in
> this case should probably be fine... Actually I have a compatible
> Corsair PSU so maybe I'll send a patch.
Patches to improve the situation are welcome. My understanding is
that with the current driver users should disable the kernel driver
if they plan to use userspace tools to access the device.
Guenter
next prev parent reply other threads:[~2021-06-17 13:14 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-17 3:11 corsair-cpro and hidraw Aleksandr Mezin
2021-06-17 4:33 ` Aleksandr Mezin
2021-06-17 6:27 ` Marius Zachmann
2021-06-17 7:11 ` Aleksandr Mezin
2021-06-17 13:14 ` Guenter Roeck [this message]
2021-06-17 23:56 ` Aleksandr Mezin
2021-06-18 5:45 ` Wilken Gottwalt
2021-06-18 6:18 ` Marius Zachmann
2021-06-18 6:47 ` Wilken Gottwalt
2021-06-18 7:06 ` Marius Zachmann
2021-06-18 12:13 ` Guenter Roeck
2021-06-18 12:22 ` Marius Zachmann
2021-06-18 19:41 ` Guenter Roeck
2021-06-18 12:10 ` Guenter Roeck
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=20210617131402.GB59767@roeck-us.net \
--to=linux@roeck-us.net \
--cc=linux-hwmon@vger.kernel.org \
--cc=mail@mariuszachmann.de \
--cc=mezin.alexander@gmail.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox