Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp3026011rwb; Mon, 15 Aug 2022 16:24:02 -0700 (PDT) X-Google-Smtp-Source: AA6agR6vkCVv1wcGVOr6ayShCPuur1/Z+dStQnG1rJ5fC8XrtR/KsUrAW78AfrfGsXd/sT8guln+ X-Received: by 2002:a63:ba49:0:b0:41c:2713:3984 with SMTP id l9-20020a63ba49000000b0041c27133984mr15424976pgu.468.1660605842731; Mon, 15 Aug 2022 16:24:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660605842; cv=none; d=google.com; s=arc-20160816; b=DtUH3+4UYDAXpXiLrGN10xY8avAxBz/Q9IYI8EoqDHBN+4J3n+n8jLMkQoTLLlB0uB 7S76mSfieyZ9SKdT1HyaLXa2996sOMXtmiWHXr+fwvMqSnUkbBlInl4oiCFWYSV9r+sy Fli/4Xiz+JuC/TyojfZP+QvHmKi5yxicvvyt1hIU8pKMPqmyGXrMbXQJ8MtGhQNE8n/2 uXjpg+XUweBnHxDPYasN0UcMqGoqg9YFj3WZo7Ek8xd9pMGUTTW+EAOXtzcteUK/mFqw pOkFklDF4sdX1r996yJaksFsVyTV4C4w6w1ckt7Ms5XmIKgtZzhvorMT4Z8hjrNJQ84L lgjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=QZ2vbRVQ/BPtfd9N+OipsAHz+V08m4EWCE5TE1Phj28=; b=vBlVyVYI9ACL3C4OZm6d91NSvwLtA7CfleDWb2W1QGuQ+okItDMe4vjReHrJz/Ghri xI9pc3i+ZfiMy/wCksCDoyGlnfIeLNc1J5c1YBaTMiUj7SIy1geHLjMMv9HKjpKFy4tK hNTJT18b8rmlf9jkXf+1CeKlTnwKe5J4G6bxR7sT4MhYW/iTsX9P8OINtabkzopQsWcW F9Rt2HUDR7Wc7OK1+AidAx3Dw1T1KK1f1BNVC+iXyReGtz0UspEYxZIfKTYoSc5ER4b2 QQ49obuNNU0V8OTaGkqaSQdnLBaxHJX/fawZLwVAQc/KAb0FTtdqoWA/m7NQ7LagP+A8 2MRA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="sx/BnN+s"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id lw6-20020a17090b180600b001f285afb589si19036780pjb.164.2022.08.15.16.23.50; Mon, 15 Aug 2022 16:24:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="sx/BnN+s"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350455AbiHOW0r (ORCPT + 99 others); Mon, 15 Aug 2022 18:26:47 -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-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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_linyyuan@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; + ret = ucsi_acknowledge_command(ucsi); + if (ret) + return ret; + switch (error) { case UCSI_ERROR_INCOMPATIBLE_PARTNER: return -EOPNOTSUPP;