Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp4917111pxu; Thu, 10 Dec 2020 08:27:24 -0800 (PST) X-Google-Smtp-Source: ABdhPJyQFl8Nq1dfSjwvG7KXxlSno6A80QZ4xhkZK4Re9/rCjWwiP1yd3B54FA2babTY8ROZ9XSt X-Received: by 2002:a50:c209:: with SMTP id n9mr7627045edf.123.1607617644617; Thu, 10 Dec 2020 08:27:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607617644; cv=none; d=google.com; s=arc-20160816; b=X4Cxllt+/T+eg03GbTvyMirO9xlC792ByunPt12V4mLS94+FO3cGgN9bWohPqJ2xVB AePql6f8vA4lTj2WTKvWjuGLVCGWRmfj/Y5IRdC4JBq3ZdROmFnT11VgOg4WiOF7En0Y 40XXYL3skQxBlrcYztRDuP4HS0pL1DLpJCWf4+yu9fvEuYFtIbZIvsQ/7Ao6d0yuW/lJ qlZSQN0SznBqhbixZ+VGWsSfTinw7pquHKubFBDNOEF5UbkW5lqhLyFK7R3h+YRgBJNT ybrQ32upNNZ17GuzkHw67XT1cRX2oAp3jYR2ALCwfUW4EssiE3la+kwyrsxtQfDUHQbw MECQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=xqTrw6zXjLgwLLbZnqkbLxByJexj2fFZi47xwczWY0I=; b=Ul2khQ5rJjQHzpK+QZIURkDO1xSuJ8ZaaOhfZmlOfnuwt31Sj/4t8CmwWhBDhkncvJ RK+IdZwcmJTWVKG69DGeRMPl8LML8awu8A/oqnj9zeTeQ8E1v+4XgVkzDD1FaaxHlM7X gxn9KkFGasKd9VPbY0Ks3xOGhZKLUMjoi+qSRZzRjBphO6KCUY4Q7SHCZBfxx1pnG8ou IIOgD1CK5n935e7tOmDw2kcxeZLKcEliLZOOoPXxMHPPo3X3PHOnqYfDsm+Sf3/V40Oe eUJQkC14i2wVk/k/JNsgRSAuBXYN/tNeibvTpy/qdNx/VxxOr/iSQ9mVC8rI898oZ8Nf eCfA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bu3si3120685edb.376.2020.12.10.08.26.53; Thu, 10 Dec 2020 08:27:24 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2392234AbgLJQFs (ORCPT + 99 others); Thu, 10 Dec 2020 11:05:48 -0500 Received: from mail.kernel.org ([198.145.29.99]:33846 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389079AbgLJQFP (ORCPT ); Thu, 10 Dec 2020 11:05:15 -0500 From: Greg Kroah-Hartman Authentication-Results: mail.kernel.org; dkim=permerror (bad message/signature format) To: heikki.krogerus@linux.intel.com, linux@roeck-us.net Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Kyle Tso , Badhri Jagan Sridharan , Will McVicker , Greg Kroah-Hartman Subject: [PATCH 3/5] USB: typec: tcpm: Fix PR_SWAP error handling Date: Thu, 10 Dec 2020 17:05:19 +0100 Message-Id: <20201210160521.3417426-4-gregkh@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201210160521.3417426-1-gregkh@linuxfoundation.org> References: <20201210160521.3417426-1-gregkh@linuxfoundation.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Kyle Tso PD rev3.0 8.3.3.16.3.6 PE_PRS_SRC_SNK_Wait_Source_on State The Policy Enging Shall transition to the ErrorRecovery state when the PSSourceOnTimer times out ... Cc: Guenter Roeck Cc: Heikki Krogerus Cc: Badhri Jagan Sridharan Signed-off-by: Kyle Tso Signed-off-by: Will McVicker Signed-off-by: Greg Kroah-Hartman --- drivers/usb/typec/tcpm/tcpm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/typec/tcpm/tcpm.c b/drivers/usb/typec/tcpm/tcpm.c index 0efda59bb104..d51c45961893 100644 --- a/drivers/usb/typec/tcpm/tcpm.c +++ b/drivers/usb/typec/tcpm/tcpm.c @@ -3728,7 +3728,7 @@ static void run_state_machine(struct tcpm_port *port) tcpm_set_state(port, ERROR_RECOVERY, 0); break; } - tcpm_set_state_cond(port, SNK_UNATTACHED, PD_T_PS_SOURCE_ON); + tcpm_set_state(port, ERROR_RECOVERY, PD_T_PS_SOURCE_ON); break; case PR_SWAP_SRC_SNK_SINK_ON: /* Set the vbus disconnect threshold for implicit contract */ -- 2.29.2