* Concern about commit bus: mhi: host: pci_generic: Read SUBSYSTEM_VENDOR_ID for VF's to check status
@ 2026-05-27 8:28 Slark Xiao
0 siblings, 0 replies; 2+ messages in thread
From: Slark Xiao @ 2026-05-27 8:28 UTC (permalink / raw)
To: Manivannan Sadhasivam, mhi, linux-kernel, linux-arm-msm
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Concern about commit bus: mhi: host: pci_generic: Read SUBSYSTEM_VENDOR_ID for VF's to check status
[not found] <2441e0c7.6edc.19e6887e64f.Coremail.slark_xiao@163.com>
@ 2026-05-27 8:43 ` Manivannan Sadhasivam
0 siblings, 0 replies; 2+ messages in thread
From: Manivannan Sadhasivam @ 2026-05-27 8:43 UTC (permalink / raw)
To: Slark Xiao; +Cc: manivannan.sadhasivam, mhi, linux-kernel, linux-arm-msm
On Wed, May 27, 2026 at 04:23:17PM +0800, Slark Xiao wrote:
> 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".
>
Sorry for the breakage! Yeah, that was a mistake. It should've been
"!pdev->is_virtfn". Let me fix it right away.
Thanks for reporting. Please share your tested-by tag for the patch after
testing it.
- Mani
--
மணிவண்ணன் சதாசிவம்
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-05-27 8:43 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-05-27 8:28 Concern about commit bus: mhi: host: pci_generic: Read SUBSYSTEM_VENDOR_ID for VF's to check status Slark Xiao
[not found] <2441e0c7.6edc.19e6887e64f.Coremail.slark_xiao@163.com>
2026-05-27 8:43 ` Manivannan Sadhasivam
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®