lkml.org 
[lkml]   [2023]   [Feb]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH v2 1/3] media: pci: intel: ivsc: Add CSI submodule
Date


> -----Original Message-----
> From: Hillf Danton <hdanton@sina.com>
> Sent: Friday, February 17, 2023 2:28 PM
>
> On Fri, 17 Feb 2023 05:52:38 +0000 Wentong Wu <wentong.wu@intel.com>
> >
> > Thanks, but what do you mean "emulated"?=20
> >
> Construct a scenario that ensures wakeup comes late because of no wait for
> completion. And we can see what will happen with the current test cases.

Thanks, I will remove reinit_completion

>
> > static int mei_csi_send(u8 *buf, size_t len)
> > +{
> > + struct csi_cmd *cmd = (struct csi_cmd *)buf;
> > + int ret;
> > +
> > + reinit_completion(&csi->cmd_completion);
> > +
> > + ret = mei_cldev_send(csi->cldev, buf, len);
> > + if (ret < 0)
> > + goto out;
>
> return -ETIMEDOUT;
>
> > +
> > + ret = wait_for_completion_killable_timeout(&csi->cmd_completion,
> > + CSI_CMD_TIMEOUT);
> > + if (ret < 0) {
> > + goto out;
> > + } else if (!ret) {
> > + ret = -ETIMEDOUT;
> > + goto out;
> > + }
> > +
> > + /* command response status */
> > + ret = csi->cmd_response.status;
> > + if (ret) {
> > + ret = -EINVAL;
> > + goto out;
> > + }
> > +
> > + if (csi->cmd_response.cmd_id != cmd->cmd_id)
> > + ret = -EINVAL;
> > +
> > +out:
> > + return ret;
> > +}

\
 
 \ /
  Last update: 2023-03-27 00:26    [W:2.607 / U:0.224 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site