Skip to content

Commit 098d837

Browse files
jhovoldMani-Sadhasivam
authored andcommitted
bus: mhi: host: pci_generic: fix MHI BAR mapping
A recent change converting the MHI pci_generic driver to use pcim_iomap_region() failed to update the BAR parameter which is an index rather than a mask. This specifically broke the modem on machines like the Lenovo ThinkPad X13s and x1e80100 CRD: mhi-pci-generic 0004:01:00.0: failed to map pci region: -22 mhi-pci-generic 0004:01:00.0: probe with driver mhi-pci-generic failed with error -22 Fixes: bd23e83 ("bus: mhi: host: pci_generic: Use pcim_iomap_region() to request and map MHI BAR") Signed-off-by: Johan Hovold <johan+linaro@kernel.org> Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Cc: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Cc: Mayank Rana <quic_mrana@quicinc.com> Link: https://lore.kernel.org/r/20241201171120.31616-1-johan+linaro@kernel.org
1 parent 40384c8 commit 098d837

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/bus/mhi/host/pci_generic.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -917,7 +917,7 @@ static int mhi_pci_claim(struct mhi_controller *mhi_cntrl,
917917
return err;
918918
}
919919

920-
mhi_cntrl->regs = pcim_iomap_region(pdev, 1 << bar_num, pci_name(pdev));
920+
mhi_cntrl->regs = pcim_iomap_region(pdev, bar_num, pci_name(pdev));
921921
if (IS_ERR(mhi_cntrl->regs)) {
922922
err = PTR_ERR(mhi_cntrl->regs);
923923
dev_err(&pdev->dev, "failed to map pci region: %d\n", err);

0 commit comments

Comments
 (0)