From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DF24B255E47; Mon, 12 May 2025 17:54:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1747072485; cv=none; b=t7B3Ksxs6GjV5TINSRDnfPKMEIoZHYsoKMv1Q/7mOTAYhAiyhHjoOx0JVNVy91E5KYSDaniZLBtco5kWR8Rv1eBs2fBx4gOrGIG2a4CbwVAWsuldZGHdDYY81HZB81F13yLQ6oDOtfct7Qri3zgj85uVr6MZR4O8omix2cHLYVw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1747072485; c=relaxed/simple; bh=z5x9ufP504T8zFkrhU/3E4xKPG1JPx8rTaoLTSzwn/Q=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=CNmtWYPlx+KMaVJ9uisb94yOpVRFvbCnUiOfx6B4uz6FI9RrM3lKKNQLIAGLPzX9Owf8RIhoEKimSuwXO5IrjlqHYEz4ydzAxW9pHyDYjlzbRC/i/T8f9x0u5lgR/04IVR1nlUxxPTdYLkR4EPxfCSOVumLvVVc9XTtERIeslwM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=mf3Ud/KV; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="mf3Ud/KV" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4E23AC4CEE7; Mon, 12 May 2025 17:54:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1747072484; bh=z5x9ufP504T8zFkrhU/3E4xKPG1JPx8rTaoLTSzwn/Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mf3Ud/KV24BTeNfLHrSnlD8R/p+JNkX4+H/qynAireGy8WDFxTjIzUkCz4nqLQ4Ax FE7pos1QqdwvdFsoJPihqQcFdVqKTDmVDlqSqNQcQAvbc789V39Hv5mdrZ4i5SDW9m b6bX34O8o5ShUyQ0LyIGeAVKhhrg05aWOSwIvI70= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, stable , RD Babiera , Badhri Jagan Sridharan , Heikki Krogerus Subject: [PATCH 6.1 54/92] usb: typec: tcpm: delay SNK_TRY_WAIT_DEBOUNCE to SRC_TRYWAIT transition Date: Mon, 12 May 2025 19:45:29 +0200 Message-ID: <20250512172025.318099939@linuxfoundation.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250512172023.126467649@linuxfoundation.org> References: <20250512172023.126467649@linuxfoundation.org> User-Agent: quilt/0.68 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.1-stable review patch. If anyone has any objections, please let me know. ------------------ From: RD Babiera commit e918d3959b5ae0e793b8f815ce62240e10ba03a4 upstream. This patch fixes Type-C Compliance Test TD 4.7.6 - Try.SNK DRP Connect SNKAS. The compliance tester moves into SNK_UNATTACHED during toggling and expects the PUT to apply Rp after tPDDebounce of detection. If the port is in SNK_TRY_WAIT_DEBOUNCE, it will move into SRC_TRYWAIT immediately and apply Rp. This violates TD 4.7.5.V.3, where the tester confirms that the PUT attaches Rp after the transitions to Unattached.SNK for tPDDebounce. Change the tcpm_set_state delay between SNK_TRY_WAIT_DEBOUNCE and SRC_TRYWAIT to tPDDebounce. Fixes: a0a3e04e6b2c ("staging: typec: tcpm: Check for Rp for tPDDebounce") Cc: stable Signed-off-by: RD Babiera Reviewed-by: Badhri Jagan Sridharan Reviewed-by: Heikki Krogerus Link: https://lore.kernel.org/r/20250429234703.3748506-2-rdbabiera@google.com Signed-off-by: Greg Kroah-Hartman --- drivers/usb/typec/tcpm/tcpm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/usb/typec/tcpm/tcpm.c +++ b/drivers/usb/typec/tcpm/tcpm.c @@ -5136,7 +5136,7 @@ static void _tcpm_cc_change(struct tcpm_ case SNK_TRY_WAIT_DEBOUNCE: if (!tcpm_port_is_sink(port)) { port->max_wait = 0; - tcpm_set_state(port, SRC_TRYWAIT, 0); + tcpm_set_state(port, SRC_TRYWAIT, PD_T_PD_DEBOUNCE); } break; case SRC_TRY_WAIT: