[PATCH 0/5] bus: mhi: host: Enable SRIOV support in MHI driver

From: Vivek . Pernamitta
Date: Thu Jul 03 2025 - 11:16:04 EST


This patch introduces several enhancements for the SRIOV support in MHI driver
focusing on enabling SRIOV and improving the MHI driver removal process.

- Add support to enable SRIOV.

- Add support to read SUBSYSTEM_VENDOR_ID for VF's to check status.

- Implement support for separate controller configurations for both
Virtual Functions (VF) and Physical Functions (PF).
The PF takes on a supervisory role and will have bootup information
such as SAHARA, DIAG, and NDB (for file system sync data, etc.).
VFs can handle function-specific data transfers, such as data plane
or hardware data.

- Perform a graceful removal of the MHI driver. Upon driver removal,
the host driver will perform a SOC_RESET on the driver remove callback.
This ensures device reset gracefully.

- honor sys_err at power_up state
In mhi_sync_power_up() host waits for device to enter in to mission mode
but SYS_ERR is an valid state, If device sends an SYS_ERR host will bail
out for wait_event_timeout() as MHI is in error state and calls
mhi_power_down which will teardown MHI driver probe.
If there is any SYS_ERR, sys_err handler needs to process SYS_ERR state
and queues the next state transition for device to bring in to Mission
mode, so mhi_sync_power_up() will wait for device to enter in to
mission mode.

Signed-off-by:

---
Vivek Pernamitta (5):
bus: mhi: host: pci_generic: Add SRIOV support for PCIe device
bus: mhi: host: Add support for separate controller configurations for VF and PF
bus: mhi: host: pci_generic: Read SUBSYSTEM_VENDOR_ID for VF's to check status
bus: mhi: host: pci_generic: Remove MHI driver and ensure graceful device recovery
bus: host: mhi: Need to honor sys_err at power_up state

drivers/bus/mhi/host/internal.h | 2 ++
drivers/bus/mhi/host/pci_generic.c | 51 +++++++++++++++++++++++++++++++++-----
drivers/bus/mhi/host/pm.c | 2 +-
3 files changed, 48 insertions(+), 7 deletions(-)
---
base-commit: 1343433ed38923a21425c602e92120a1f1db5f7a
change-id: 20250701-sriov_vdev_next-20250630-0ee75f15d03b

Best regards,
--
Vivek Pernamitta <<quic_vpernami@xxxxxxxxxxx>>