All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Kishore Batta" <kishore.batta@oss.qualcomm.com>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH v9 4/7] bus: mhi: Add QDU100 Sahara variant and firmware fallback
Date: Tue, 13 Oct 2026 09:01:23 +0000	[thread overview]
Message-ID: <sashiko-outbox-169305@kernel.org> (raw)
In-Reply-To: <20261013-sahara_protocol_new_v2-v9-4-dc9f24357c4a@oss.qualcomm.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] mhi: sahara: patch changes behavior for AIC100/AIC200 despite commit message claims
--

commit 95400c2cb3bcfef8a4adb0c664417375ff8137c7
Author: Kishore Batta <kishore.batta@oss.qualcomm.com>

bus: mhi: Add QDU100 Sahara variant and firmware fallback

Extend the probe time variant selection to match the SAHARA MHI channel and
associate it with the QDU100 firmware folder. Add a firmware lookup fallback
for cases where an image does not have an explicit entry in the device's
firmware table.

> This change only affects devices matched on the SAHARA MHI channel and
> does not change behavior for existing AIC100 and AIC200 devices.

Is this description accurate?

The qaic controller driver configures aic100_sahara_fw and aic200_sahara_fw to
populate the fw_folder field as "aic100" and "aic200".

With the new fallback logic in sahara_find_image(), if an existing AIC device
requests an unknown image ID, it appears it will now trigger the new fallback
path and perform synchronous VFS lookups for "qcom/aic.../<id>", whereas
previously it would immediately fail with -EINVAL.

> diff --git a/drivers/bus/mhi/host/clients/sahara/sahara.c b/drivers/bus/mhi/host/clients/sahara/sahara.c
> index ce4fcbd40baa1..a4b3ef197b303 100644
> --- a/drivers/bus/mhi/host/clients/sahara/sahara.c
> +++ b/drivers/bus/mhi/host/clients/sahara/sahara.c
[ ... ]
> @@ -200,8 +201,28 @@ static int sahara_find_image(struct sahara_context *context, u32 image_id)
>  	}
>  
>  	if (image_id >= context->table_size || !context->image_table[image_id]) {
> -		dev_err(&context->mhi_dev->dev, "request for unknown image: %d\n", image_id);
> -		return -EINVAL;
> +		if (!context->fw_folder) {
> +			dev_err(&context->mhi_dev->dev,
> +				"Request for unknown image: %u (no fw folder)\n", image_id);
> +			return -EINVAL;
> +		}
> +
> +		fw_path = kasprintf(GFP_KERNEL, "qcom/%s/%u",
> +				    context->fw_folder, image_id);
> +		if (!fw_path)
> +			return -ENOMEM;
> +
> +		ret = firmware_request_nowarn(&context->firmware,
> +					      fw_path,
> +					      &context->mhi_dev->dev);
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[Severity: Medium]
Could this fallback path introduce a regression for AIC100 and AIC200
devices? It looks like those devices have a fw_folder configured, so they
would execute this filesystem lookup for unknown IDs rather than immediately
failing with -EINVAL as they did before this patch.

> +		kfree(fw_path);
> +		if (ret) {
> +			dev_err(&context->mhi_dev->dev,
> +				"request for unknown image: %d\n", image_id);
> +			return -EINVAL;
> +		}
> +		context->active_image_id = image_id;
> +		return 0;
>  	}

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261013-sahara_protocol_new_v2-v9-0-dc9f24357c4a@oss.qualcomm.com?part=4

  reply	other threads:[~2026-10-13  9:01 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-13  8:45 [PATCH v9 0/7] Qualcomm Sahara protocol enhancements Kishore Batta
2026-10-13  8:45 ` [PATCH v9 1/7] Add documentation for Sahara protocol Kishore Batta
2026-10-13  8:51   ` sashiko-bot
2026-10-13  8:45 ` [PATCH v9 2/7] bus: mhi: Move Sahara protocol driver under MHI host client drivers Kishore Batta
2026-10-13  9:00   ` sashiko-bot
2026-10-13  8:45 ` [PATCH v9 3/7] bus: mhi: Centralize Sahara firmware image table selection at probe time Kishore Batta
2026-10-13  8:45 ` [PATCH v9 4/7] bus: mhi: Add QDU100 Sahara variant and firmware fallback Kishore Batta
2026-10-13  9:01   ` sashiko-bot [this message]
2026-10-13  8:45 ` [PATCH v9 5/7] bus: mhi: Load DDR training data using device serial number Kishore Batta
2026-10-13  9:00   ` sashiko-bot
2026-10-13  8:45 ` [PATCH v9 6/7] bus: mhi: Capture DDR training data via command mode Kishore Batta
2026-10-13  8:59   ` sashiko-bot
2026-10-13  8:45 ` [PATCH v9 7/7] bus: mhi: Expose DDR training data via controller sysfs Kishore Batta
2026-10-13  8:58   ` sashiko-bot

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=sashiko-outbox-169305@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=kishore.batta@oss.qualcomm.com \
    --cc=sashiko-reviews@lists.linux.dev \
    /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.