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

Vivek.Pernamitta@quicinc.com posted 6 patches 2 weeks, 6 days ago
drivers/bus/mhi/host/internal.h    |  2 ++
drivers/bus/mhi/host/pci_generic.c | 69 ++++++++++++++++++++++++++++++--------
drivers/bus/mhi/host/pm.c          |  2 +-
3 files changed, 58 insertions(+), 15 deletions(-)
[PATCH v4 0/6] bus: mhi: host: Enable SRIOV support in MHI driver
Posted by Vivek.Pernamitta@quicinc.com 2 weeks, 6 days ago
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.

- Remove health check monitor for VF's and read PF's device id for VF.

- 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.
  
- Add support in mhi power up to handle sys_err state instread of treating
  as error.
  In power-up or recovery scenarios, the device may enter a valid SYS_ERR
  state due to a prior reset. Currently, mhi_sync_power_up() exits early
  when this state is detected, causing recovery to fail. This change
  ensures the host waits for the device to transition to Mission Mode even
  after SYS_ERR, allowing proper error handling and recovery.

- Add Support to configure DMA mask for VFs expliclty for QDU100.

Signed-off-by: Vivek Pernamitta <quic_vpernami@quicinc.com>
---
changes in v4:
- updated commit messages as per Mani's comments
- update macro name MHI_PM_IN_UNRECOVERABLE_STATE to MHI_PM_FATAL_ERROR
- Added return type and inline comments which got removed.
- link to V3: https://lore.kernel.org/mhi/20250821-vdev_next-20250821_sriov-v3-0-e1b017c48d4a@quicinc.com/T/#m6552b907b0c58d5ebd1d3019ea0a446d09210367

Changes in v3:
- Updated commit messages for individual gerrits as per Konrad and Mani
- Disabled health check moniter for VF.
- reordered patchset 3 and 4.
- Removed empty lines, unsymmetric functions, comments and alinged mhi_pci_driver structure 
- Renamed struct member from reset_on_driver_unbind to reset_on_remove.
- Added support for higher DMA mask for VFs on QDU100.

Changes in v2:
- Changed order of patchsets from V1 as per Konrad comments.
- Added spec version for separate controller configurations for both VF andi
  PF as per Krishna comments.
- Updated git commit message as per Krishna comments..
- Added mhi_pci_remove in shutdown callback in pci_generic instead of
  duplicating the same sequence in both as per Krishna comments..
- Link to v1: https://lore.kernel.org/r/20250703-sriov_vdev_next-20250630-v1-0-87071d1047e3@quicinc.com
---

---
Vivek Pernamitta (6):
      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: Add SRIOV support
      bus: mhi: host: pci_generic: Remove MHI driver and ensure graceful device recovery
      bus: mhi: core: Improve mhi_sync_power_up handling for SYS_ERR state
      bus: mhi: host: pci_generic: Support independent DMA mask for VFs

 drivers/bus/mhi/host/internal.h    |  2 ++
 drivers/bus/mhi/host/pci_generic.c | 69 ++++++++++++++++++++++++++++++--------
 drivers/bus/mhi/host/pm.c          |  2 +-
 3 files changed, 58 insertions(+), 15 deletions(-)
---
base-commit: 8f21d9da46702c4d6951ba60ca8a05f42870fe8f
change-id: 20250912-uevent_vdev_next-20250911-cbb99ff802ee

Best regards,
-- 
Vivek Pernamitta <<quic_vpernami@quicinc.com>>
Re: [PATCH v4 0/6] bus: mhi: host: Enable SRIOV support in MHI driver
Posted by Manivannan Sadhasivam 1 week, 6 days ago
On Fri, 12 Sep 2025 18:18:04 +0530, Vivek.Pernamitta@quicinc.com wrote:
> 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.
> 
> - Remove health check monitor for VF's and read PF's device id for VF.
> 
> [...]

Applied, thanks!

[1/6] bus: mhi: host: Add support for separate controller configurations for VF and PF
      commit: a9e3d5a69cf8d1a73733c52f593a3f803f576391
[2/6] bus: mhi: host: pci_generic: Read SUBSYSTEM_VENDOR_ID for VF's to check status
      commit: b4d01c5b9a9d2dc39f52be22809e845cc4c46f03
[3/6] bus: mhi: host: pci_generic: Add SRIOV support
      commit: fd6e0509d0e86059f9a1c25b0b91ef5d0021701f
[4/6] bus: mhi: host: pci_generic: Remove MHI driver and ensure graceful device recovery
      commit: 12543f4405887da9f3e401e708ca0ff796a7b866
[5/6] bus: mhi: core: Improve mhi_sync_power_up handling for SYS_ERR state
      commit: aa1a0e93ed21a06acb7ca9d4a4a9fce75ea53d0c
[6/6] bus: mhi: host: pci_generic: Support independent DMA mask for VFs
      commit: 54c67740fff7360b6607d02b8499d09b944b3fda

Best regards,
-- 
Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>