[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <2025112542-affection-estranged-b67c@gregkh>
Date: Tue, 25 Nov 2025 12:45:54 +0100
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: Haotian Zhang <vulab@...as.ac.cn>
Cc: Heikki Krogerus <heikki.krogerus@...ux.intel.com>,
Dmitry Baryshkov <dmitry.baryshkov@....qualcomm.com>,
linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] usb: typec: ucsi: Treat alt mode and status failures
as non-fatal
On Tue, Nov 25, 2025 at 05:20:39PM +0800, Haotian Zhang wrote:
> The ucsi_register_altmodes() and ucsi_get_connector_status() can fail
> for reasons that should not prevent the port from being registered.
> These failures should be logged but should not cause the entire port
> registration to fail.
>
> Set ret to 0 in these error paths to allow registration to continue.
>
> Fixes: b9aa02ca39a4 ("usb: typec: ucsi: Add polling mechanism for partner tasks like alt mode checking")
> Suggested-by: Heikki Krogerus <heikki.krogerus@...ux.intel.com>
> Signed-off-by: Haotian Zhang <vulab@...as.ac.cn>
> ---
> Changes in v2:
> - Instead of unregistering the port on alt mode/status failures,
> treat these errors as non-fatal by setting ret = 0
> - Changed Fixes tag to b9aa02ca39a4.
> ---
> drivers/usb/typec/ucsi/ucsi.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/usb/typec/ucsi/ucsi.c b/drivers/usb/typec/ucsi/ucsi.c
> index 3f568f790f39..77b05cd3917e 100644
> --- a/drivers/usb/typec/ucsi/ucsi.c
> +++ b/drivers/usb/typec/ucsi/ucsi.c
> @@ -1656,6 +1656,7 @@ static int ucsi_register_port(struct ucsi *ucsi, struct ucsi_connector *con)
> if (ret) {
> dev_err(ucsi->dev, "con%d: failed to register alt modes\n",
> con->num);
> + ret = 0;
> goto out;
> }
>
> @@ -1663,6 +1664,7 @@ static int ucsi_register_port(struct ucsi *ucsi, struct ucsi_connector *con)
> ret = ucsi_get_connector_status(con, false);
> if (ret) {
> dev_err(ucsi->dev, "con%d: failed to get status\n", con->num);
> + ret = 0;
> goto out;
> }
>
> --
> 2.25.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
Powered by blists - more mailing lists