[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1ac2154c-e74c-ebec-90d1-11ddf9b3ba1a@quicinc.com>
Date: Mon, 31 Jul 2023 11:07:50 +0530
From: Krishna Chaitanya Chundru <quic_krichai@...cinc.com>
To: Manivannan Sadhasivam <mani@...nel.org>,
Dan Carpenter <dan.carpenter@...aro.org>
CC: <manivannan.sadhasivam@...aro.org>, <helgaas@...nel.org>,
<linux-pci@...r.kernel.org>, <linux-arm-msm@...r.kernel.org>,
<linux-kernel@...r.kernel.org>, <quic_vbadigan@...cinc.com>,
<quic_nitegupt@...cinc.com>, <quic_skananth@...cinc.com>,
<quic_ramkri@...cinc.com>, <krzysztof.kozlowski@...aro.org>,
Jeffrey Hugo <quic_jhugo@...cinc.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Dan Carpenter <error27@...il.com>,
"Rafael J. Wysocki" <rafael@...nel.org>,
"open list:MHI BUS" <mhi@...ts.linux.dev>
Subject: Re: [PATCH v4 9/9] bus: mhi: ep: wake up host if the MHI state is in
M3
On 7/28/2023 9:05 PM, Manivannan Sadhasivam wrote:
> On Fri, Jul 28, 2023 at 08:50:55AM +0300, Dan Carpenter wrote:
>> On Fri, Jul 28, 2023 at 10:04:52AM +0530, Manivannan Sadhasivam wrote:
>>>> @@ -464,6 +484,13 @@ int mhi_ep_queue_skb(struct mhi_ep_device *mhi_dev, struct sk_buff *skb)
>>>> buf_left = skb->len;
>>>> ring = &mhi_cntrl->mhi_chan[mhi_chan->chan].ring;
>>>>
>>>> + if (mhi_cntrl->mhi_state == MHI_STATE_M3) {
>>>> + if (mhi_ep_wake_host(mhi_cntrl)) {
>>> Don't you need lock here in the case of multiple queue requests?
>>>
>>> - Mani
>>>
>>>> + dev_err(dev, "Failed to wakeup host\n");
>>>> + return -ENODEV;
>>>> + }
>>>> + }
>>>> +
>>>> mutex_lock(&mhi_chan->lock);
>> ^^^^^^^^^^^^^^^^^^^^^^^^^^
>> This lock isn't enough?
>>
> The position of this lock won't prevent cocurrent access to mhi_ep_wake_host().
>
> - Mani
I will add the lock in the next series.
>> regards,
>> dan carpenter
Powered by blists - more mailing lists