[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <378575f3-a0be-44ec-99b0-2579bcc7f644@collabora.com>
Date: Fri, 11 Jul 2025 15:22:48 +0500
From: Muhammad Usama Anjum <usama.anjum@...labora.com>
To: Krishna Chaitanya Chundru <krishna.chundru@....qualcomm.com>,
Manivannan Sadhasivam <mani@...nel.org>, Jeff Johnson <jjohnson@...nel.org>,
Jeff Hugo <jeff.hugo@....qualcomm.com>,
Youssef Samir <quic_yabdulra@...cinc.com>,
Matthew Leung <quic_mattleun@...cinc.com>, Yan Zhen <yanzhen@...o.com>,
Alexander Wilhelm <alexander.wilhelm@...termo.com>,
Alex Elder <elder@...nel.org>, Kunwu Chan <chentao@...inos.cn>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Siddartha Mohanadoss <smohanad@...eaurora.org>,
Sujeev Dias <sdias@...eaurora.org>, Julia Lawall <julia.lawall@...6.fr>,
John Crispin <john@...ozen.org>, Muna Sinada <quic_msinada@...cinc.com>,
Venkateswara Naralasetty <quic_vnaralas@...cinc.com>,
Maharaja Kennadyrajan <quic_mkenna@...cinc.com>, mhi@...ts.linux.dev,
linux-arm-msm@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-wireless@...r.kernel.org, ath11k@...ts.infradead.org
Cc: kernel@...labora.com
Subject: Re: [PATCH 3/3] bus: mhi: keep device context through suspend cycles
...
>>>> diff --git a/drivers/bus/mhi/host/init.c b/drivers/bus/mhi/host/init.c
>>>> index 2e0f18c939e68..8f56e73fdc42e 100644
>>>> --- a/drivers/bus/mhi/host/init.c
>>>> +++ b/drivers/bus/mhi/host/init.c
>>>> @@ -1133,9 +1133,11 @@ int mhi_prepare_for_power_up(struct mhi_controller *mhi_cntrl)
>>>> mutex_lock(&mhi_cntrl->pm_mutex);
>>>> - ret = mhi_init_dev_ctxt(mhi_cntrl);
>>> mhi init dev ctxt also initializes the ring pointers to base value,
>>> I think we should take care of them also ?
>> Are you referring to mhi_rings? They are getting initialized inside
>> mhi_init_dev_ctxt() and de-initialized in __mhi_deinit_dev_ctxt(). That's
>> why I've not handled them separately.
>>
> Maybe I was not clear in my previous comment/not a correct place to do
> the comment.
>
> My point you are not freeing __mhi_deinit_dev_ctxt as part of suspend,
> that means we are expecting device will continue to use the rp and wr pointers of ring as the previous i.e before suspend pointers.
>
> What if PCIe keeps link in D3cold as part of system suspend, will the
> device able to handle the previous rp & wp of ring. I don't think
> device can handle this.
I don't have much internals logic of the driver. I've checked on my device and
the read/write pointers have 2 entries for mhi_event and 1 entry for mhi_cmd. But still
without resetting these, I've not got any problem. Any idea why?
I'll reset rings' read/write pointers in v2.
Powered by blists - more mailing lists