Re: [PATCH] usb: typec: ucsi: Acknowledge the GET_ERROR_STATUS command completion

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jul 26, 2022 at 02:45:49PM +0800, Linyu Yuan wrote:
> We found PPM will not send any notification after it report error status
> and OPM issue GET_ERROR_STATUS command to read the details about error.
> 
> According UCSI spec, PPM may clear the Error Status Data after the OPM
> has acknowledged the command completion.
> 
> This change add operation to acknowledge the command completion from PPM.
> 
> Fixes: bdc62f2bae8f (usb: typec: ucsi: Simplified registration and I/O API)
> Cc: <stable@xxxxxxxxxxxxxxx> # 5.10
> Signed-off-by: Jack Pham <quic_jackp@xxxxxxxxxxx>
> Signed-off-by: Linyu Yuan <quic_linyyuan@xxxxxxxxxxx>

Acked-by: Heikki Krogerus <heikki.krogerus@xxxxxxxxxxxxxxx>

> ---
>  drivers/usb/typec/ucsi/ucsi.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/usb/typec/ucsi/ucsi.c b/drivers/usb/typec/ucsi/ucsi.c
> index cbd862f..1aea464 100644
> --- a/drivers/usb/typec/ucsi/ucsi.c
> +++ b/drivers/usb/typec/ucsi/ucsi.c
> @@ -76,6 +76,10 @@ static int ucsi_read_error(struct ucsi *ucsi)
>  	if (ret)
>  		return ret;
>  
> +	ret = ucsi_acknowledge_command(ucsi);
> +	if (ret)
> +		return ret;
> +
>  	switch (error) {
>  	case UCSI_ERROR_INCOMPATIBLE_PARTNER:
>  		return -EOPNOTSUPP;

thanks,

-- 
heikki



[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux