Re: [PATCH char-misc-next 4/4] issei: add driver to driver interface
From: Arnd Bergmann
Date: Thu Oct 15 2026 - 02:31:59 EST
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