From: Heikki Krogerus <heikki.krogerus@linux.intel.com>
To: Badhri Jagan Sridharan <badhri@google.com>
Cc: gregkh@linuxfoundation.org, linux@roeck-us.net,
kyletso@google.com, linux-usb@vger.kernel.org,
linux-kernel@vger.kernel.org, rdbabiera@google.com,
amitsd@google.com, stable@vger.kernel.org,
frank.wang@rock-chips.com,
"Gábor Stefanik" <netrolller.3d@gmail.com>
Subject: Re: [PATCH v2] Revert "usb: typec: tcpm: fix cc role at port reset"
Date: Thu, 18 Jan 2024 11:35:27 +0200 [thread overview]
Message-ID: <Zajw3+8TOiDxiOR8@kuha.fi.intel.com> (raw)
In-Reply-To: <20240117114742.2587779-1-badhri@google.com>
Hi,
On Wed, Jan 17, 2024 at 11:47:42AM +0000, Badhri Jagan Sridharan wrote:
> This reverts commit 1e35f074399dece73d5df11847d4a0d7a6f49434.
>
> Given that ERROR_RECOVERY calls into PORT_RESET for Hi-Zing
> the CC pins, setting CC pins to default state during PORT_RESET
> breaks error recovery.
>
> 4.5.2.2.2.1 ErrorRecovery State Requirements
> The port shall not drive VBUS or VCONN, and shall present a
> high-impedance to ground (above zOPEN) on its CC1 and CC2 pins.
>
> Hi-Zing the CC pins is the inteded behavior for PORT_RESET.
> CC pins are set to default state after tErrorRecovery in
> PORT_RESET_WAIT_OFF.
>
> 4.5.2.2.2.2 Exiting From ErrorRecovery State
> A Sink shall transition to Unattached.SNK after tErrorRecovery.
> A Source shall transition to Unattached.SRC after tErrorRecovery.
>
> Cc: stable@vger.kernel.org
> Cc: Frank Wang <frank.wang@rock-chips.com>
> Fixes: 1e35f074399d ("usb: typec: tcpm: fix cc role at port reset")
> Signed-off-by: Badhri Jagan Sridharan <badhri@google.com>
> ---
> drivers/usb/typec/tcpm/tcpm.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/usb/typec/tcpm/tcpm.c b/drivers/usb/typec/tcpm/tcpm.c
> index 5945e3a2b0f7..9d410718eaf4 100644
> --- a/drivers/usb/typec/tcpm/tcpm.c
> +++ b/drivers/usb/typec/tcpm/tcpm.c
> @@ -4876,8 +4876,7 @@ static void run_state_machine(struct tcpm_port *port)
> break;
> case PORT_RESET:
> tcpm_reset_port(port);
> - tcpm_set_cc(port, tcpm_default_state(port) == SNK_UNATTACHED ?
> - TYPEC_CC_RD : tcpm_rp_cc(port));
> + tcpm_set_cc(port, TYPEC_CC_OPEN);
> tcpm_set_state(port, PORT_RESET_WAIT_OFF,
> PD_T_ERROR_RECOVERY);
> break;
Gábor had some concerns with this in v1.
thanks,
--
heikki
next prev parent reply other threads:[~2024-01-18 9:35 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-17 11:47 [PATCH v2] Revert "usb: typec: tcpm: fix cc role at port reset" Badhri Jagan Sridharan
2024-01-17 15:25 ` Guenter Roeck
2024-01-18 9:35 ` Heikki Krogerus [this message]
2024-02-08 22:01 ` Mark Brown
2024-02-10 7:38 ` Linux regression tracking #adding (Thorsten Leemhuis)
2024-02-16 6:56 ` Linux regression tracking #update (Thorsten Leemhuis)
2024-02-11 15:50 ` Gábor Stefanik
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Zajw3+8TOiDxiOR8@kuha.fi.intel.com \
--to=heikki.krogerus@linux.intel.com \
--cc=amitsd@google.com \
--cc=badhri@google.com \
--cc=frank.wang@rock-chips.com \
--cc=gregkh@linuxfoundation.org \
--cc=kyletso@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=netrolller.3d@gmail.com \
--cc=rdbabiera@google.com \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox