On Mon, Jul 13, 2026 at 12:55:52PM +0530, Kishore Batta wrote: > > On 7/9/2026 11:49 AM, Manivannan Sadhasivam wrote: > > On Wed, Jul 01, 2026 at 04:07:38PM +0530, Kishore Batta wrote: > > > The Sahara driver currently selects a firmware image table based on the > > > attached device, but it does not recognize QDU100 devices that expose the > > > protocol on the SAHARA MHI channel. As a result, the host cannot associate > > > QDU100 devices with the correct firmware namespace during image transfer. > > > > > > 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 allows required images to be provisioned by > > > the platform. > > > > > > This change only affects devices matched on the SAHARA MHI channel and > > > does not change behavior for existing AIC100 and AIC200 devices. > > > > > > Signed-off-by: Kishore Batta <[email protected]> > > > --- > > > drivers/bus/mhi/host/clients/sahara/sahara.c | 27 +++++++++++++++-- > > > drivers/bus/mhi/host/pci_generic.c | 45 > > > ++++++++++++++++++++++++++++ > > > 2 files changed, 70 insertions(+), 2 deletions(-) > > > > > > diff --git a/drivers/bus/mhi/host/clients/sahara/sahara.c > > > b/drivers/bus/mhi/host/clients/sahara/sahara.c > > > index > > > e339c67e236af271645ca81cc517efd9eead87e4..9adbd84859073d8024ba2a5fcfa33897439d6759 > > > 100644 > > > --- a/drivers/bus/mhi/host/clients/sahara/sahara.c > > > +++ b/drivers/bus/mhi/host/clients/sahara/sahara.c > > > @@ -189,6 +189,7 @@ static bool is_streaming(struct sahara_context > > > *context) > > > static int sahara_find_image(struct sahara_context *context, u32 > > > image_id) > > > { > > > + char *fw_path; > > > int ret; > > > if (image_id == context->active_image_id) > > > @@ -201,8 +202,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); > > > + 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; > > > } > > > /* > > > @@ -870,8 +891,10 @@ static void sahara_mhi_dl_xfer_cb(struct mhi_device > > > *mhi_dev, struct mhi_result > > > static const struct mhi_device_id sahara_mhi_match_table[] = { > > > { .chan = "QAIC_SAHARA", }, > > > + { .chan = "SAHARA"}, > > > {}, > > > }; > > > +MODULE_DEVICE_TABLE(mhi, sahara_mhi_match_table); > > This change should belong to a separate patch. > > There was a review comment from Jeff(v4, patch 3) to move to this change to > the patch which adds QDU100 support so that it doesn't break bisect. Please > let me know if i need to move it to a separate patch altogether ? >
Since it is a new device support for Sahara, bisect is not really a problem. But I do see a value in keeping everything in a single patch. - Mani -- மணிவண்ணன் சதாசிவம்
