From: Kishore Batta <kishore.batta@oss.qualcomm.com>
To: Jeff Hugo <jeff.hugo@oss.qualcomm.com>,
Jonathan Corbet <corbet@lwn.net>,
Shuah Khan <skhan@linuxfoundation.org>,
Carl Vanderlip <carl.vanderlip@oss.qualcomm.com>,
Oded Gabbay <ogabbay@kernel.org>,
Manivannan Sadhasivam <mani@kernel.org>,
andersson@kernel.org
Cc: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org,
mhi@lists.linux.dev
Subject: Re: [PATCH v4 4/9] bus: mhi: Centralize firmware image table selection at probe time
Date: Mon, 13 Apr 2026 14:34:10 +0530 [thread overview]
Message-ID: <a5fdde58-3ae0-466f-aea3-8367c6c94f5a@oss.qualcomm.com> (raw)
In-Reply-To: <2eda7d10-e4a9-4ca7-ae73-bf9c0ca8fa33@oss.qualcomm.com>
On 4/10/2026 2:22 AM, Jeff Hugo wrote:
> On 3/19/2026 12:31 AM, Kishore Batta wrote:
>> The Sahara driver currently selects firmware image tables using
>> scattered, device specific conditionals in the probe path, making the
>> logic harder to follow and extend.
>
> "to follow" (remove extra space)
ACK.
>
>> Refactor firmware image table selection into a single, explicit
>> probe-time
>> mechanism by introducing a variant table that captures device matching,
>> firmware image tables, firmware folder names, and streaming behavior in
>> one place.
>>
>> This centralizes device specific decisions, simplifies the probe logic,
>> and avoids ad-hoc conditionals while preserving the existing behavior
>> for
>> all supported AIC devices.
>
> It would probably be useful to mention this is in preparation for
> adding QDU100 support, otherwise this reads like it is just change for
> the sake of change.
Sure. I will mention in next version.
>
>> Signed-off-by: Kishore Batta <kishore.batta@oss.qualcomm.com>
>> ---
>> drivers/bus/mhi/sahara/sahara.c | 66
>> ++++++++++++++++++++++++++++++++++++-----
>> 1 file changed, 58 insertions(+), 8 deletions(-)
>>
>> diff --git a/drivers/bus/mhi/sahara/sahara.c
>> b/drivers/bus/mhi/sahara/sahara.c
>> index
>> e3499977e7c6b53bc624a8eb00d0636f2ea63307..8f1c0d72066c0cf80c09d78bfc51df2e482133b9
>> 100644
>> --- a/drivers/bus/mhi/sahara/sahara.c
>> +++ b/drivers/bus/mhi/sahara/sahara.c
>> @@ -180,6 +180,16 @@ struct sahara_context {
>> u32 read_data_length;
>> bool is_mem_dump_mode;
>> bool non_streaming;
>> + const char *fw_folder;
>> +};
>> +
>> +struct sahara_variant {
>> + const char *match;
>> + bool match_is_chan;
>
> This is dead code, add it later on when it gets used.
ACK.
>
>> + const char * const *image_table;
>> + size_t table_size;
>> + const char *fw_folder;
>
> This is dead code, add it later on when it gets used.
ACK.
>
>> + bool non_streaming;
>
> Please run pahole on this structure. With the interleaving of types
> for every other member, I'm expecting there would be quite a bit of
> compiler added padding.
Sure. I had ran pahole on this structure and 8 bytes can be saved. I
will rearrange the members of the structure in the next version.
>
>
next prev parent reply other threads:[~2026-04-13 9:04 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-19 6:31 [PATCH v4 0/9] Qualcomm Sahara protocol enhancements Kishore Batta
2026-03-19 6:31 ` [PATCH v4 1/9] Add documentation for Sahara protocol Kishore Batta
2026-04-09 19:47 ` Jeff Hugo
2026-04-13 9:03 ` Kishore Batta
2026-03-19 6:31 ` [PATCH v4 2/9] bus: mhi: Move sahara protocol driver under drivers/bus/mhi Kishore Batta
2026-04-09 20:20 ` Jeff Hugo
2026-04-13 9:03 ` Kishore Batta
2026-04-13 11:04 ` Manivannan Sadhasivam
2026-04-14 9:45 ` Kishore Batta
2026-04-13 11:20 ` Manivannan Sadhasivam
2026-04-14 9:48 ` Kishore Batta
2026-03-19 6:31 ` [PATCH v4 3/9] bus: mhi: Match devices exposing the protocol on the SAHARA channel Kishore Batta
2026-04-09 20:23 ` Jeff Hugo
2026-04-13 9:03 ` Kishore Batta
2026-03-19 6:31 ` [PATCH v4 4/9] bus: mhi: Centralize firmware image table selection at probe time Kishore Batta
2026-04-09 20:52 ` Jeff Hugo
2026-04-13 9:04 ` Kishore Batta [this message]
2026-04-13 11:26 ` Manivannan Sadhasivam
2026-04-14 9:49 ` Kishore Batta
2026-03-19 6:31 ` [PATCH v4 5/9] bus: mhi: Add QDU100 variant and image_id firmware fallback Kishore Batta
2026-04-09 21:14 ` Jeff Hugo
2026-04-13 11:34 ` Manivannan Sadhasivam
2026-04-14 9:51 ` Kishore Batta
2026-03-19 6:31 ` [PATCH v4 6/9] bus: mhi: Load DDR training data using per-device serial number Kishore Batta
2026-04-09 21:23 ` Jeff Hugo
2026-03-19 6:31 ` [PATCH v4 7/9] bus: mhi: Capture DDR training data using command mode Kishore Batta
2026-03-22 17:39 ` kernel test robot
2026-04-09 21:27 ` Jeff Hugo
2026-04-13 9:05 ` Kishore Batta
2026-03-19 6:31 ` [PATCH v4 8/9] bus: mhi: Expose DDR training data via controller sysfs Kishore Batta
2026-04-13 11:58 ` Manivannan Sadhasivam
2026-04-14 9:56 ` Kishore Batta
2026-03-19 6:31 ` [PATCH v4 9/9] Documentation: ABI: Add sysfs ABI documentation for DDR training data Kishore Batta
2026-04-09 21:30 ` Jeff Hugo
2026-04-13 9:05 ` Kishore Batta
2026-04-13 11:59 ` Manivannan Sadhasivam
2026-04-14 9:57 ` Kishore Batta
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=a5fdde58-3ae0-466f-aea3-8367c6c94f5a@oss.qualcomm.com \
--to=kishore.batta@oss.qualcomm.com \
--cc=andersson@kernel.org \
--cc=carl.vanderlip@oss.qualcomm.com \
--cc=corbet@lwn.net \
--cc=dri-devel@lists.freedesktop.org \
--cc=jeff.hugo@oss.qualcomm.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mani@kernel.org \
--cc=mhi@lists.linux.dev \
--cc=ogabbay@kernel.org \
--cc=skhan@linuxfoundation.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox