* [PATCH] usb: typec: ucsi: fix probe failure in gaokun_ucsi_probe()
@ 2025-11-25 8:25 Duoming Zhou
2025-11-25 8:32 ` Greg KH
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Duoming Zhou @ 2025-11-25 8:25 UTC (permalink / raw)
To: linux-usb
Cc: gregkh, heikki.krogerus, mitltlatltl, linux-kernel, Duoming Zhou
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 dose
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")
Signed-off-by: Duoming Zhou <duoming@zju.edu.cn>
---
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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] usb: typec: ucsi: fix probe failure in gaokun_ucsi_probe()
2025-11-25 8:25 [PATCH] usb: typec: ucsi: fix probe failure in gaokun_ucsi_probe() Duoming Zhou
@ 2025-11-25 8:32 ` Greg KH
2025-11-25 8:53 ` Sergey Shtylyov
2025-11-25 11:08 ` Pengyu Luo
2 siblings, 0 replies; 4+ messages in thread
From: Greg KH @ 2025-11-25 8:32 UTC (permalink / raw)
To: Duoming Zhou; +Cc: linux-usb, heikki.krogerus, mitltlatltl, linux-kernel
On Tue, Nov 25, 2025 at 04:25:05PM +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 dose
> 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")
> Signed-off-by: Duoming Zhou <duoming@zju.edu.cn>
> ---
> 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
>
>
Hi,
This is the friendly patch-bot of Greg Kroah-Hartman. You have sent him
a patch that has triggered this response. He used to manually respond
to these common problems, but in order to save his sanity (he kept
writing the same thing over and over, yet to different people), I was
created. Hopefully you will not take offence and will fix the problem
in your patch and resubmit it so that it can be accepted into the Linux
kernel tree.
You are receiving this message because of the following common error(s)
as indicated below:
- You have marked a patch with a "Fixes:" tag for a commit that is in an
older released kernel, yet you do not have a cc: stable line in the
signed-off-by area at all, which means that the patch will not be
applied to any older kernel releases. To properly fix this, please
follow the documented rules in the
Documentation/process/stable-kernel-rules.rst file for how to resolve
this.
If you wish to discuss this problem further, or you have questions about
how to resolve this issue, please feel free to respond to this email and
Greg will reply once he has dug out from the pending patches received
from other developers.
thanks,
greg k-h's patch email bot
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] usb: typec: ucsi: fix probe failure in gaokun_ucsi_probe()
2025-11-25 8:25 [PATCH] usb: typec: ucsi: fix probe failure in gaokun_ucsi_probe() Duoming Zhou
2025-11-25 8:32 ` Greg KH
@ 2025-11-25 8:53 ` Sergey Shtylyov
2025-11-25 11:08 ` Pengyu Luo
2 siblings, 0 replies; 4+ messages in thread
From: Sergey Shtylyov @ 2025-11-25 8:53 UTC (permalink / raw)
To: Duoming Zhou, linux-usb
Cc: gregkh, heikki.krogerus, mitltlatltl, linux-kernel
On 11/25/25 11:25 AM, 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 dose
s/dose/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")
> Signed-off-by: Duoming Zhou <duoming@zju.edu.cn>
[...]
MBR, Sergey
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] usb: typec: ucsi: fix probe failure in gaokun_ucsi_probe()
2025-11-25 8:25 [PATCH] usb: typec: ucsi: fix probe failure in gaokun_ucsi_probe() Duoming Zhou
2025-11-25 8:32 ` Greg KH
2025-11-25 8:53 ` Sergey Shtylyov
@ 2025-11-25 11:08 ` Pengyu Luo
2 siblings, 0 replies; 4+ messages in thread
From: Pengyu Luo @ 2025-11-25 11:08 UTC (permalink / raw)
To: Duoming Zhou; +Cc: linux-usb, gregkh, heikki.krogerus, linux-kernel
On Tue, Nov 25, 2025 at 4:25 PM Duoming Zhou <duoming@zju.edu.cn> 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 dose
> 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")
> Signed-off-by: Duoming Zhou <duoming@zju.edu.cn>
.poll_cci() was also introduced around that time. I missed it. Thanks
for fixing it up.
Reviewed-by: Pengyu Luo <mitltlatltl@gmail.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-11-25 11:10 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-25 8:25 [PATCH] usb: typec: ucsi: fix probe failure in gaokun_ucsi_probe() Duoming Zhou
2025-11-25 8:32 ` Greg KH
2025-11-25 8:53 ` Sergey Shtylyov
2025-11-25 11:08 ` Pengyu Luo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox