mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Aleksa Savic <savicaleksa83@gmail.com>
To: Guenter Roeck <linux@roeck-us.net>,
	Leonard Anderweit <leonard.anderweit@gmail.com>,
	linux-hwmon@vger.kernel.org
Cc: savicaleksa83@gmail.com, Jack Doan <me@jackdoan.com>,
	Jean Delvare <jdelvare@suse.com>,
	Jonathan Corbet <corbet@lwn.net>,
	linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/5] hwmon: (aquacomputer_d5next) Add temperature offset control for Aquaero
Date: Sat, 11 Feb 2023 22:17:34 +0100	[thread overview]
Message-ID: <f9442671-1978-1e7b-f262-cac3504849df@gmail.com> (raw)
In-Reply-To: <904da857-2e27-87a1-4541-6288df564d80@roeck-us.net>

On 2023-02-11 21:48:56 GMT+01:00, Guenter Roeck wrote:
> On 2/11/23 11:48, Leonard Anderweit wrote:
>> Am 11.02.23 um 19:54 schrieb Aleksa Savic:
>>> On 2023-02-11 19:08:27 GMT+01:00, Guenter Roeck wrote:
>>>>
>>>> aquaero is already supported, and the checksum is so far generated
>>>> and sent. Is it ignored ? Also, is it guaranteed that _all_ aquero devices
>>>> don't need it ?
>>>
>>> Reading its sensors is currently supported, not writing to it (before these
>>> patches).
>>>
>>> The checksum is ignored and not needed for either aquaero 5 (which Leonard has)
>>> nor 6 (which I have).
>>>
>>>>
>>>> If it is not needed and ignored, does it really add value to selectively drop it ?
>>>
>>> I think we can indeed remove that check.
>>
>> I don't think that check can be removed as the checksum is not appended 
>> to the control report but is in the last two bytes. So using the 
>> checksum on Aquaero will overwrite the data at that location. It is 
>> currently unknown what these two bytes do so I do not want to overwrite 
>> them.
>>
> 
> The current code _does_ overwrite those bytes, or am I missing something ?
> 
> If so, changing that would be a bug fix which really should not be hidden
> in a patch making functional changes.
> 
> Thanks,
> Guenter

The current code indeed does that because the devices that have writing
implemented work that way (D5 Next, Quadro, Octo - they have priv->fan_ctrl_offsets
set, which is checked in aqc_is_visible()) plus they need the checksum.

Regarding the aquaero checksum, I was under the wrong impression that its
control report contained a place for it. I've just captured a few reports and it
seems to contain purely settings all the way to the end. I've also compared
reports before and after making changes and only the changed settings reflected
in the hex dumps, showing there really is no checksum.

So, to correct myself from earlier: the checksum is not getting ignored; it has
no place in it at all, as the code and testing show.

Thanks,
Aleksa

> 
>>>
>>> Thanks,
>>> Aleksa
>>>
>>>>
>>>> Either case, this change is not mentioned in the commit log, and it
>>>> violates the "one logical change per patch" rule. Please split it into
>>>> a separate patch and explain why the change is needed.
>>>>
>>>> Another change to separate is the introduction of ctrl_report_id
>>>> and the secondary_ctrl_report variables, which is also done silently
>>>> and not explained. That should also be a separate patch to simplify
>>>> review.
>>
>> I will separate the changes into more commits for the next version.
>>
>> Regards,
>> Leonard
>>
>>>>
>>>> Thanks,
>>>> Guenter
>>>
> 


  reply	other threads:[~2023-02-11 21:17 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-11 16:59 [PATCH 0/5] hwmon: (aquacomputer_d5next) Add Aquacomputer Aquaero control Leonard Anderweit
2023-02-11 16:59 ` [PATCH 1/5] hwmon: (aquacomputer_d5next) Support one byte control values Leonard Anderweit
2023-02-11 16:59 ` [PATCH 2/5] hwmon: (aquacomputer_d5next) Support writing multiple control values at once Leonard Anderweit
2023-02-11 16:59 ` [PATCH 3/5] hwmon: (aquacomputer_d5next) Add temperature offset control for Aquaero Leonard Anderweit
2023-02-11 18:08   ` Guenter Roeck
2023-02-11 18:54     ` Aleksa Savic
2023-02-11 19:48       ` Leonard Anderweit
2023-02-11 20:48         ` Guenter Roeck
2023-02-11 21:17           ` Aleksa Savic [this message]
2023-02-11 16:59 ` [PATCH 4/5] hwmon: (aquacomputer_d5next) Add fan PWM " Leonard Anderweit
2023-02-11 16:59 ` [PATCH 5/5] hwmon: (aquacomputer_d5next) Add PWM mode " Leonard Anderweit
2023-02-11 17:41   ` Guenter Roeck
2023-02-11 19:06     ` Aleksa Savic

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=f9442671-1978-1e7b-f262-cac3504849df@gmail.com \
    --to=savicaleksa83@gmail.com \
    --cc=corbet@lwn.net \
    --cc=jdelvare@suse.com \
    --cc=leonard.anderweit@gmail.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=me@jackdoan.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

all inboxes | Powered by JetHome®