From: Tudor Ambarus <tudor.ambarus@linaro.org>
To: "André Draszik" <andre.draszik@linaro.org>,
"Krzysztof Kozlowski" <krzk@kernel.org>,
"Alim Akhtar" <alim.akhtar@samsung.com>
Cc: Peter Griffin <peter.griffin@linaro.org>,
Will McVicker <willmcvicker@google.com>,
kernel-team@android.com, linux-kernel@vger.kernel.org,
linux-samsung-soc@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Subject: Re: [PATCH 1/3] firmware: exynos-acpm: fix reading longer results
Date: Mon, 17 Mar 2025 10:23:11 +0000 [thread overview]
Message-ID: <5918c64f-856b-4820-b35b-538ffdd9ac6a@linaro.org> (raw)
In-Reply-To: <20250314-acpm-fixes-v1-1-ab03ca8e723f@linaro.org>
On 3/14/25 4:40 PM, André Draszik wrote:
> ACPM commands that return more than 8 bytes currently don't work
> correctly, as this driver ignores any such returned bytes.
>
> This is evident in at least acpm_pmic_bulk_read(), where up to 8
> registers can be read back and those 8 register values are placed
> starting at &xfer->rxd[8].
>
> The reason is that xfter->rxlen is initialized with the size of a
> pointer (8 bytes), rather than the size of the byte array that pointer
> points to (16 bytes)
>
> Update the code such that we set the number of bytes expected to be the
> size of the rx buffer.
>
> Note1: While different commands have different lengths rx buffers, we
> have to specify the same length for all rx buffers since acpm_get_rx()
> assumes they're all the same length.
>
> Note2: The different commands also have different lengths tx buffers,
> but before switching the code to use the minimum possible length, some
> more testing would have to be done to ensure this works correctly in
> all situations. It seems wiser to just apply this fix here without
> additional logic changes for now.
>
> Fixes: a88927b534ba ("firmware: add Exynos ACPM protocol driver")
> Signed-off-by: André Draszik <andre.draszik@linaro.org>
Reviewed-by: Tudor Ambarus <tudor.ambarus@linaro.org>
next prev parent reply other threads:[~2025-03-17 10:23 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-14 16:40 [PATCH 0/3] firmware: exynos-acpm: read fix & reduce log verbosity André Draszik
2025-03-14 16:40 ` [PATCH 1/3] firmware: exynos-acpm: fix reading longer results André Draszik
2025-03-17 10:23 ` Tudor Ambarus [this message]
2025-03-14 16:40 ` [PATCH 2/3] firmware: exynos-acpm: silence EPROBE_DEFER error on boot André Draszik
2025-03-17 10:26 ` Tudor Ambarus
2025-03-17 10:48 ` Tudor Ambarus
2025-03-18 20:48 ` André Draszik
2025-03-14 16:40 ` [PATCH 3/3] firmware: exynos-acpm: convert to dev_err_probe() in client API André Draszik
2025-03-17 11:11 ` Tudor Ambarus
2025-03-18 19:23 ` Krzysztof Kozlowski
2025-03-18 20:37 ` André Draszik
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=5918c64f-856b-4820-b35b-538ffdd9ac6a@linaro.org \
--to=tudor.ambarus@linaro.org \
--cc=alim.akhtar@samsung.com \
--cc=andre.draszik@linaro.org \
--cc=kernel-team@android.com \
--cc=krzk@kernel.org \
--cc=krzysztof.kozlowski@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=peter.griffin@linaro.org \
--cc=willmcvicker@google.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®