On Wed, Mar 13, 2024 at 05:54:12AM +0200, Dmitry Baryshkov wrote: > When the PPM reports UCSI_CCI_NOT_SUPPORTED for the command, the flag > remains set and no further commands are allowed to be processed until > OPM acknowledges failed command completion using ACK_CC_CI. Add missing > call to ucsi_acknowledge_command(). > > Fixes: bdc62f2bae8f ("usb: typec: ucsi: Simplified registration and I/O API") > Cc: stable@xxxxxxxxxxxxxxx > Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@xxxxxxxxxx> Reviewed-by: Heikki Krogerus <heikki.krogerus@xxxxxxxxxxxxxxx> > --- > drivers/usb/typec/ucsi/ucsi.c | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/drivers/usb/typec/ucsi/ucsi.c b/drivers/usb/typec/ucsi/ucsi.c > index 4abb752c6806..bde4f03b9aa2 100644 > --- a/drivers/usb/typec/ucsi/ucsi.c > +++ b/drivers/usb/typec/ucsi/ucsi.c > @@ -167,8 +167,10 @@ static int ucsi_exec_command(struct ucsi *ucsi, u64 cmd) > if (!(cci & UCSI_CCI_COMMAND_COMPLETE)) > return -EIO; > > - if (cci & UCSI_CCI_NOT_SUPPORTED) > - return -EOPNOTSUPP; > + if (cci & UCSI_CCI_NOT_SUPPORTED) { > + ret = ucsi_acknowledge_command(ucsi); > + return ret ? ret : -EOPNOTSUPP; > + } > > if (cci & UCSI_CCI_ERROR) { > if (cmd == UCSI_GET_ERROR_STATUS) > > -- > 2.39.2 -- heikki