Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp5457582pxu; Tue, 22 Dec 2020 18:38:51 -0800 (PST) X-Google-Smtp-Source: ABdhPJy30lHaGsfhS/X0wh1FQOV0DA/A62zP8ZhyxqifoWdI6H+yP2Ogu8/dO1V37/y0YJfoZGvM X-Received: by 2002:a17:906:8058:: with SMTP id x24mr21508768ejw.262.1608691131507; Tue, 22 Dec 2020 18:38:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608691131; cv=none; d=google.com; s=arc-20160816; b=UBgGtF3EF7XgVMjwIS/f7IgMeLr2XJZNoor7TpGbecb5OzGTwZUE4Jzn2Fh/KYYdf0 Etg10hOEB96dLCOGzjIiync4cliBE3TFM8r4IS1Cx6rZ0v5umvC/LRW5Hnhh9yN42IKI fS6cQqh06EycjxzSmjIDTuDdsvaCIaI+uWo5Z5DyO74Gf4b+BcfFyPk7ur7vlpxdxKVz bKTF+W/VhjxL+l9koQCdEu0OOsjUQ2fFV9dpW6K0KNv+GMfIY9SK7wpbc2GL7OunyKYI kwjK6DBmY7CSDzn6W/9XrzvnvpQmJ3ZAqxYny4gxXYszL8tEtbcc+tdgFWfwCTVnyxY5 9DGA== 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 :dkim-signature; bh=RISWcZcNZEmjA7toDGLOhAYrdiTRQBEjKbFOifB7fsk=; b=FCgdevnkcKQux6v4tE8rjC9e6jMPvX1zYna/UJwlVr9GZed9ewh+tNnW9Sx/AYRrqh s1fy5ghe2nB4N6J1LBNtN26Xcc2wW6w16ZTOVqa4MDvPBPGz4V1r2HJzX8t32ukelXo9 8+7SaPwwj1SPzAF++2b4OtqHLzpvBATmRtmufD01KF1jP2NN/GV4XtqIsGfPNMzY8pXL q5hX0HNoBh/9RjM/pmAjsGddhLsbLPsmHgBHZbESfIU4ci6ehS2Kt4HEPPj9EOdHebf/ iEjvt+3Ua4rfcU9MdCLwsqynQAathQEb1lmT/sM+BwTKYGweCVfqVvzmqHcqh5/cBuc+ 013w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="Wf6R/I+8"; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id hr22si10076235ejc.411.2020.12.22.18.38.29; Tue, 22 Dec 2020 18:38:51 -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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="Wf6R/I+8"; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730180AbgLWChm (ORCPT + 99 others); Tue, 22 Dec 2020 21:37:42 -0500 Received: from mail.kernel.org ([198.145.29.99]:52560 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730171AbgLWCYU (ORCPT ); Tue, 22 Dec 2020 21:24:20 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 719D322AAF; Wed, 23 Dec 2020 02:24:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1608690244; bh=2baLd7G6FKO3JwsZYeeLATPe/21sVJUcpc//7lAZn5Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Wf6R/I+8iX4ad8PC2/z9RlC1WXIouJIdeI4AbxJk9izkzdwBcyz8tx9wKNvQxb/Xi 79MIyEQbFZlOFAhvLJwgPcbxa9oUrpWiqUVjGWp3C0uMfmNJR9FCve16gaH/SKUAJ4 +sMNDhrB7l9neEn4YVhFoBWZRO0eFOIPou6uIJ7FVY7pLy8idtidijsul9aS4atQBO M8tYtu2yoY+OG6lxEiZ2rG+ELmoawcS5wCiNrPU83FvgMv45f7QBUeecCzbALHKYu0 E2yAroYpZ8RnP5CH6NPw8hA7oFDQyI6YbGLLA3yxw5EQdO/fViT/qxNl9Ua75xX9Ja qg1EdYdB0i7bQ== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Kyle Tso , Guenter Roeck , Heikki Krogerus , Badhri Jagan Sridharan , Will McVicker , Greg Kroah-Hartman , Sasha Levin , devel@driverdev.osuosl.org Subject: [PATCH AUTOSEL 4.14 57/66] USB: typec: tcpm: Fix PR_SWAP error handling Date: Tue, 22 Dec 2020 21:22:43 -0500 Message-Id: <20201223022253.2793452-57-sashal@kernel.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20201223022253.2793452-1-sashal@kernel.org> References: <20201223022253.2793452-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Kyle Tso [ Upstream commit 301a633c1b5b2caa4c4b97a83270d4a1d60c53bf ] 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 Reviewed-by: Guenter Roeck Acked-by: Heikki Krogerus Signed-off-by: Kyle Tso Signed-off-by: Will McVicker Signed-off-by: Greg Kroah-Hartman Link: https://lore.kernel.org/r/20201210160521.3417426-4-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin --- drivers/staging/typec/tcpm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/typec/tcpm.c b/drivers/staging/typec/tcpm.c index 686037a498c19..39f99a80daf73 100644 --- a/drivers/staging/typec/tcpm.c +++ b/drivers/staging/typec/tcpm.c @@ -2710,7 +2710,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: tcpm_set_state(port, SNK_STARTUP, 0); -- 2.27.0