From nobody Mon Sep 29 20:17:12 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4FE38C32764 for ; Mon, 15 Aug 2022 22:28:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350466AbiHOW0s (ORCPT ); Mon, 15 Aug 2022 18:26:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60522 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1350884AbiHOWSr (ORCPT ); Mon, 15 Aug 2022 18:18:47 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 96C3F65835; Mon, 15 Aug 2022 12:42:58 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 927D1611DD; Mon, 15 Aug 2022 19:42:57 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 80251C433D6; Mon, 15 Aug 2022 19:42:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660592577; bh=FU1YbE1E2NkvVleTcRnvyZW61eUHNYJXk19HtY0RX9A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sx/BnN+s9oDXvrPMJzWNJeoVdTHZRFDUkE4rt3M70xWD7wUFJoj9yY5KByzaTHPOl ccR5hulhgN+YCYn8MF387wtTiwd2fEmbR/mwViwecdK8EpqwHvz4Da0ZufT7eIFya5 Zo+mZBKpCCl7+s50Ceu9uudcO2PDGKye4/Q0VtaE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jack Pham , Linyu Yuan Subject: [PATCH 5.19 0132/1157] usb: typec: ucsi: Acknowledge the GET_ERROR_STATUS command completion Date: Mon, 15 Aug 2022 19:51:28 +0200 Message-Id: <20220815180444.903623677@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180439.416659447@linuxfoundation.org> References: <20220815180439.416659447@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Linyu Yuan commit a7dc438b5e446afcd1b3b6651da28271400722f2 upstream. 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: # 5.10 Signed-off-by: Jack Pham Signed-off-by: Linyu Yuan Link: https://lore.kernel.org/r/1658817949-4632-1-git-send-email-quic_linyy= uan@quicinc.com Signed-off-by: Greg Kroah-Hartman --- drivers/usb/typec/ucsi/ucsi.c | 4 ++++ 1 file changed, 4 insertions(+) --- 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 * if (ret) return ret; =20 + ret =3D ucsi_acknowledge_command(ucsi); + if (ret) + return ret; + switch (error) { case UCSI_ERROR_INCOMPATIBLE_PARTNER: return -EOPNOTSUPP;