Messages in this thread | | | Date | Fri, 28 Jul 2023 08:50:55 +0300 | From | Dan Carpenter <> | Subject | Re: [PATCH v4 9/9] bus: mhi: ep: wake up host if the MHI state is in M3 |
| |
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?
regards, dan carpenter
| |