Concern about commit bus: mhi: host: pci_generic: Read SUBSYSTEM_VENDOR_ID for VF's to check status

From: Slark Xiao

Date: Wed May 27 2026 - 04:29:43 EST


Hi Mani,
I got a problem recently about the health_check function. It's disabled in my Thinkpad X1 Gen14.
After checking, this feature was disbaled because the commit bus: mhi: host: pci_generic: Read SUBSYSTEM_VENDOR_ID for VF's to check status.

This commit only allows the device that the value "pdev->is_physfn" is true to enable health check.
But I don't know why my PC and WWAN device would get a false result. Test result as below:

[    3.920101] mhi-pci-generic 0000:08:00.0: MHI PCI device found: foxconn-t99w696
[    3.920113] mhi-pci-generic 0000:08:00.0: ##debug## mhi_cntrl_config is assign
[    3.920114] mhi-pci-generic 0000:08:00.0: ##debug## mhi_pci_claim ..
[    3.920127] mhi-pci-generic 0000:08:00.0: enabling device (0000 -> 0002)
[    3.920179] mhi-pci-generic 0000:08:00.0: ##debug## mhi_pci_get_irqs ..
[    3.930223] mhi-pci-generic 0000:08:00.0: ##debug## mhi_register_controller ..
[    3.935268] mhi-pci-generic 0000:08:00.0: ##debug## mhi_prepare_for_power_up ..
[    3.935373] mhi-pci-generic 0000:08:00.0: ##debug## mhi_sync_power_up ..
[    3.935375] mhi mhi0: Requested to power ON
[    3.935388] mhi mhi0: Power on setup success
[    3.971342] mhi-pci-generic 0000:08:00.0: pdev->is_physfn is 0
[    3.971346] mhi-pci-generic 0000:08:00.0: pdev->is_virtfn is 0

For my situation, both pdev->is_virtfn and pdev->is_physfn are false.
And I also checked the requirement for pdev->is_physf, seems it will only be 1 if the device has SR-IOV capbility and the function is recognized as a PF. If your device is just
a regular PCIe function or the kernel does not recognize the SR-IOV capability, it will be 0.

So for mhi_pci_generic side, I suggest that we should modify it by using "!pdev->is_virtfn" instead of "pdev->is_physfn".

Thanks