linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Duoming Zhou <duoming@zju.edu.cn>
Cc: linux-usb@vger.kernel.org, heikki.krogerus@linux.intel.com,
	mitltlatltl@gmail.com, linux-kernel@vger.kernel.org,
	sergei.shtylyov@gmail.com, stable@vger.kernel.org
Subject: Re: [PATCH v2 1/2] usb: typec: ucsi: fix probe failure in gaokun_ucsi_probe()
Date: Wed, 17 Dec 2025 14:19:44 +0100	[thread overview]
Message-ID: <2025121729-enduring-legend-6e4f@gregkh> (raw)
In-Reply-To: <4d077d6439d728be68646bb8c8678436a3a0885e.1764065838.git.duoming@zju.edu.cn>

On Tue, Nov 25, 2025 at 06:36:26PM +0800, Duoming Zhou wrote:
> The gaokun_ucsi_probe() uses ucsi_create() to allocate a UCSI instance.
> The ucsi_create() validates whether ops->poll_cci is defined, and if not,
> it directly returns -EINVAL. However, the gaokun_ucsi_ops structure does
> not define the poll_cci, causing ucsi_create() always fail with -EINVAL.
> This issue can be observed in the kernel log with the following error:
> 
> ucsi_huawei_gaokun.ucsi huawei_gaokun_ec.ucsi.0: probe with driver
> ucsi_huawei_gaokun.ucsi failed with error -22
> 
> Fix the issue by adding the missing poll_cci callback to gaokun_ucsi_ops.
> 
> Fixes: 00327d7f2c8c ("usb: typec: ucsi: add Huawei Matebook E Go ucsi driver")
> Cc: stable@vger.kernel.org
> Signed-off-by: Duoming Zhou <duoming@zju.edu.cn>
> ---
> Changes in v2:
>   - Add cc: stable.
>   - Correct spelling mistake.
> 
>  drivers/usb/typec/ucsi/ucsi_huawei_gaokun.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/usb/typec/ucsi/ucsi_huawei_gaokun.c b/drivers/usb/typec/ucsi/ucsi_huawei_gaokun.c
> index 7b5222081bb..8401ab414bd 100644
> --- a/drivers/usb/typec/ucsi/ucsi_huawei_gaokun.c
> +++ b/drivers/usb/typec/ucsi/ucsi_huawei_gaokun.c
> @@ -196,6 +196,7 @@ static void gaokun_ucsi_connector_status(struct ucsi_connector *con)
>  const struct ucsi_operations gaokun_ucsi_ops = {
>  	.read_version = gaokun_ucsi_read_version,
>  	.read_cci = gaokun_ucsi_read_cci,
> +	.poll_cci = gaokun_ucsi_read_cci,
>  	.read_message_in = gaokun_ucsi_read_message_in,
>  	.sync_control = ucsi_sync_control_common,
>  	.async_control = gaokun_ucsi_async_control,
> -- 
> 2.34.1
> 

What ever happened to this?  if it is still needed, please rebase
against 6.19-rc1 and resend.

thanks,

greg k-h

  parent reply	other threads:[~2025-12-17 13:19 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-25 10:36 [PATCH v2 0/2] usb: typec: ucsi: Fixes for Huawei Matebook E Go UCSI driver Duoming Zhou
2025-11-25 10:36 ` [PATCH v2 1/2] usb: typec: ucsi: fix probe failure in gaokun_ucsi_probe() Duoming Zhou
2025-11-26  9:49   ` Heikki Krogerus
2025-12-17 13:19   ` Greg KH [this message]
2025-11-25 10:36 ` [PATCH v2 2/2] usb: typec: ucsi: fix use-after-free caused by uec->work Duoming Zhou
2025-11-25 11:44   ` Greg KH
2025-11-25 12:02     ` duoming
2025-11-25 13:02       ` Greg KH
2025-11-26  9:50   ` Heikki Krogerus

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=2025121729-enduring-legend-6e4f@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=duoming@zju.edu.cn \
    --cc=heikki.krogerus@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=mitltlatltl@gmail.com \
    --cc=sergei.shtylyov@gmail.com \
    --cc=stable@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).