Skip to content

Commit 0494cf9

Browse files
Vivek PernamittaMani-Sadhasivam
authored andcommitted
bus: mhi: host: pci_generic: Disable runtime PM for QDU100
The QDU100 device does not support the MHI M3 state, necessitating the disabling of runtime PM for this device. It is essential to disable runtime PM if the device does not support M3 state. Signed-off-by: Vivek Pernamitta <[email protected]> [mani: Fixed the kdoc comment for no_m3] Signed-off-by: Manivannan Sadhasivam <[email protected]> Reviewed-by: Krishna Chaitanya Chundru <[email protected]> Link: https://patch.msgid.link/20250425-vdev_next-20250411_pm_disable-v4-1-d4870a73ebf9@quicinc.com
1 parent ae5a342 commit 0494cf9

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

drivers/bus/mhi/host/pci_generic.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
* @mru_default: default MRU size for MBIM network packets
4444
* @sideband_wake: Devices using dedicated sideband GPIO for wakeup instead
4545
* of inband wake support (such as sdx24)
46+
* @no_m3: M3 not supported
4647
*/
4748
struct mhi_pci_dev_info {
4849
const struct mhi_controller_config *config;
@@ -54,6 +55,7 @@ struct mhi_pci_dev_info {
5455
unsigned int dma_data_width;
5556
unsigned int mru_default;
5657
bool sideband_wake;
58+
bool no_m3;
5759
};
5860

5961
#define MHI_CHANNEL_CONFIG_UL(ch_num, ch_name, el_count, ev_ring) \
@@ -295,6 +297,7 @@ static const struct mhi_pci_dev_info mhi_qcom_qdu100_info = {
295297
.bar_num = MHI_PCI_DEFAULT_BAR_NUM,
296298
.dma_data_width = 32,
297299
.sideband_wake = false,
300+
.no_m3 = true,
298301
};
299302

300303
static const struct mhi_channel_config mhi_qcom_sa8775p_channels[] = {
@@ -1306,8 +1309,8 @@ static int mhi_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
13061309
/* start health check */
13071310
mod_timer(&mhi_pdev->health_check_timer, jiffies + HEALTH_CHECK_PERIOD);
13081311

1309-
/* Only allow runtime-suspend if PME capable (for wakeup) */
1310-
if (pci_pme_capable(pdev, PCI_D3hot)) {
1312+
/* Allow runtime suspend only if both PME from D3Hot and M3 are supported */
1313+
if (pci_pme_capable(pdev, PCI_D3hot) && !(info->no_m3)) {
13111314
pm_runtime_set_autosuspend_delay(&pdev->dev, 2000);
13121315
pm_runtime_use_autosuspend(&pdev->dev);
13131316
pm_runtime_mark_last_busy(&pdev->dev);

0 commit comments

Comments
 (0)