mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Arnd Bergmann" <arnd@arndb.de>
To: "Alexander Usyskin" <alexander.usyskin@intel.com>,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>
Cc: linux-kernel@vger.kernel.org,
	"Menachem Adin" <menachem.adin@intel.com>,
	"Andrzej Kacprowski" <andrzej.kacprowski@linux.intel.com>,
	"Karol Wachowski" <karol.wachowski@linux.intel.com>,
	"Reuven Abliyev" <reuvenab@gmail.com>
Subject: Re: [PATCH char-misc-next 4/4] issei: add driver to driver interface
Date: Thu, 15 Oct 2026 08:29:54 +0200	[thread overview]
Message-ID: <4253b355-9505-4854-8ee0-3c1db765d3d2@app.fastmail.com> (raw)
In-Reply-To: <20261015-issei_pm_and_itf-v1-4-8212238a57a4@intel.com>

On Thu, Oct 15, 2026, at 07:28, Alexander Usyskin wrote:

> +	if (idev->rst_state != ISSEI_RST_STATE_DONE) {
> +		wait_event_interruptible_timeout(idev->wait_rst_state,
> +						 idev->rst_state == ISSEI_RST_STATE_DONE,
> +						 msecs_to_jiffies(ISSEI_DEVICE_CONNECT_TO_MS));
> +		if (idev->rst_state != ISSEI_RST_STATE_DONE) {
> +			dev_dbg(&idev->dev, "Device is in transition\n");
> +			return -ENODEV;
> +		}


> +		wret = wait_event_interruptible_timeout(cl->write_wait,
> +							issei_cl_check_write(cl) != 1,
> +							msecs_to_jiffies(timeout));
> +		if (wret <= 0) {
> +			issei_cl_clean_all_wbuf(cl);
> +			if (wret == 0) /* timed out */
> +				return -ETIMEDOUT;
> +			if (signal_pending(current))
> +				return -EINTR;
> +			return -ERESTARTSYS;

The wait logic is inconsistent here, the first one ignores the timeout
and pending signal, the second one flips -ERESTARTSYS to -EINTR and
everything else to -ERESTARTSYS, which is also questionable.

> +#if IS_ENABLED(CONFIG_INTEL_SSEI)
> +
> +void *issei_device_open(int (*match)(struct device *, const void *), 
> const void *data);
> +void issei_device_release(void *ctx);
...
> +#else
> +
> +void *issei_device_open(int (*match)(struct device *, const void *), 
> const void *data)
> +{
> +	return ERR_PTR(-EOPNOTSUPP);
> +}

What is the intended use case for !CONFIG_INTEL_SSEI in the caller,
and what do you expect to happen when CONFIG_INTEL_SSEI=m but the
caller is configured as built-in?

      Arnd

  reply	other threads:[~2026-10-15  6:31 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-15  5:28 [PATCH char-misc-next 0/4] issei: runtime power management, dma and in-kernel interface Alexander Usyskin
2026-10-15  5:28 ` [PATCH char-misc-next 1/4] issei: save power_down flag while processing event Alexander Usyskin
2026-10-15  5:28 ` [PATCH char-misc-next 2/4] issei: add runtime pm Alexander Usyskin
2026-10-15  5:28 ` [PATCH char-misc-next 3/4] issei: host_client: add dma allocation support Alexander Usyskin
2026-10-15  5:28 ` [PATCH char-misc-next 4/4] issei: add driver to driver interface Alexander Usyskin
2026-10-15  6:29   ` Arnd Bergmann [this message]
2026-10-15 12:47     ` Usyskin, Alexander
2026-10-15 12:58       ` Arnd Bergmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4253b355-9505-4854-8ee0-3c1db765d3d2@app.fastmail.com \
    --to=arnd@arndb.de \
    --cc=alexander.usyskin@intel.com \
    --cc=andrzej.kacprowski@linux.intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=karol.wachowski@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=menachem.adin@intel.com \
    --cc=reuvenab@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®