]> git.ipfire.org Git - thirdparty/linux.git/commit
bus: mhi: host: pci_generic: Fix the physical function check
authorManivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
Wed, 27 May 2026 08:46:13 +0000 (10:46 +0200)
committerManivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
Wed, 27 May 2026 15:43:11 +0000 (17:43 +0200)
commit32845111e8ea6ef5e837b6d25080e69e99bd4561
tree6f6b27b68685c6b2865fca257de9d580232f354a
parent519ddf194b158b91439319f6b977b8a465fda0fb
bus: mhi: host: pci_generic: Fix the physical function check

Commit b4d01c5b9a9d ("bus: mhi: host: pci_generic: Read SUBSYSTEM_VENDOR_ID
for VF's to check status") added the check for physical function by
checking for 'pdev->is_physfn. But 'pdev->is_physfn' is only set for the
physical function of a SR-IOV capable device. But for the non-SR-IOV device
this variable will be 0. So this check ended up breaking the health check
functionality for all non-SR-IOV devices.

Fix it by checking for '!pdev->is_virtfn' to make sure that the check is
only skipped for virtual functions.

Cc: stable@vger.kernel.org # 6.18
Reported-by: Slark Xiao <slark_xiao@163.com>
Tested-by: Slark Xiao <slark_xiao@163.com>
Fixes: b4d01c5b9a9d ("bus: mhi: host: pci_generic: Read SUBSYSTEM_VENDOR_ID for VF's to check status")
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
drivers/bus/mhi/host/pci_generic.c