Received: by 2002:a05:7412:8d1c:b0:fa:4c10:6cad with SMTP id bj28csp466212rdb; Wed, 17 Jan 2024 07:25:52 -0800 (PST) X-Google-Smtp-Source: AGHT+IFatqjvpzLMTdHs9LWIuJ2TfdGh31UQnpOp1c6xhGDhvsId3AWcFGSjlmur68pVY/HXnCXZ X-Received: by 2002:ad4:5bc4:0:b0:681:6878:a905 with SMTP id t4-20020ad45bc4000000b006816878a905mr4854131qvt.48.1705505152500; Wed, 17 Jan 2024 07:25:52 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705505152; cv=pass; d=google.com; s=arc-20160816; b=F0gEs+KPbdGmUM6fEu3dJcGFwabzCsnVRHbddV0ktbD61OeEN4ZhApOj3Ikva1t0LN MStIC0qYMPABAR7qrMoXmPTtWDet4Em2jL4w6FS+JJZ7wknhK1Udrrkji2z6X7KOIZho s3yzWPqB19Rvx8UUCIk3krAJA8Lt+bv8F/RnB1jzkKE1khU/bWH+zdQez8jbIzy7KZQu eEzRvTsvOYYaZhMaTGWqqdrexsWWPFkK4jbGNE9LmcQFgp7iqXtJx+Gu1Z8kENHFAMHP jPUWgu2hcHep3S4puvVoZDxsVdPYv5MrkHyN5ZZbmY4/NIRMYOJ///NBs3T1ifDNOuJ/ 0XMg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id :sender:dkim-signature; bh=nS6nMmsu/9xE5EGiCBV7dIp6aXfPWddYayi2QGOSCU0=; fh=y+MHGq01ewq/rseqDn9ProntZgcYUxvPyCqOY/RlVaE=; b=PAgo2ojzE6cTClUhp1tf0q3IENToNo/vNDcdYu/RmpX7UIoKvjYACkoOMPnEogVBTz vZWs9zg4SFI8sZ9sXtXLBl1VtrA9EHdnDiTjPy2XAaRFf5uJGOgkzxkMfto10iQDvqnF tt/hwF8i8LBqZo0Y/wnJnvUBvvn6TaxggvA+vYtmthi4LL67gZFJr8F8YypgyyhsTpNN nN7PJkYKDHpO/gQDLpcp6hBqelHSpTvHS89ObxMoV7IW/WxCjtTkeOoEitvk9og9G57s yd2MIcuC99ECooW6Cjt52uv4sU04SZfQt5d4fukIuejhrNUlIasVwndPhSCHAEJM57Pv QAWQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="Q/QcRA+H"; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-29151-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-29151-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id h8-20020a0cf208000000b006805ccf4b5dsi3296167qvk.338.2024.01.17.07.25.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Jan 2024 07:25:52 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-29151-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="Q/QcRA+H"; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-29151-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-29151-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 379A21C217E2 for ; Wed, 17 Jan 2024 15:25:52 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BE27921A0A; Wed, 17 Jan 2024 15:25:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Q/QcRA+H" Received: from mail-pl1-f177.google.com (mail-pl1-f177.google.com [209.85.214.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 08DF7210F4; Wed, 17 Jan 2024 15:25:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.177 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705505139; cv=none; b=o4sAtXA2cMm9V0+A3AhFnQghkVMj8lcC4uvIJ5QteouCmmTxDlyHzRRo0aUW5hA4VOE8jxXQD2spfm/zNqcmJueshGQz1q+AAQgyxiIMg83Xw0YDmPqlYgfaH7u1JESCS0TIsZjRj5KZPpD/VEM4+i/MTfjxLq9yChnG9wgm/ak= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705505139; c=relaxed/simple; bh=Rcs+b1DhIDaUE+WOqZ4ASK9U+kRcwL+nmYcX0OBTNI8=; h=Received:DKIM-Signature:X-Google-DKIM-Signature: X-Gm-Message-State:X-Google-Smtp-Source:X-Received:Received:Sender: Message-ID:Date:MIME-Version:User-Agent:Subject:Content-Language: To:Cc:References:From:Autocrypt:In-Reply-To:Content-Type: Content-Transfer-Encoding; b=kLPKBtXVlbdZXh1AToLxgyL7zOrgmG7zKAiFiKuvOe7OfnO47YEYgHFQhZMTYgveRrAC0vB6KGavMc+2tNkfYCA+e2aUcUdoTCMPN+8eQVfkv7aSdFHfhHa1Kz4t3X49GGUq/tOI+GL2OVF0Ld51lVSC657rdngiuprimkQBEw0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=roeck-us.net; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=Q/QcRA+H; arc=none smtp.client-ip=209.85.214.177 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=roeck-us.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pl1-f177.google.com with SMTP id d9443c01a7336-1d4414ec9c7so56853065ad.0; Wed, 17 Jan 2024 07:25:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1705505137; x=1706109937; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version:date:message-id :sender:from:to:cc:subject:date:message-id:reply-to; bh=nS6nMmsu/9xE5EGiCBV7dIp6aXfPWddYayi2QGOSCU0=; b=Q/QcRA+H/Htuf5Crx+HjfnK2OS2g+BWRJZozH+n917A2/E+LZLHxHpwES+VRnhYjJa +5RP/f1+eZTzclPuCe0k8JPif6YpyePBcgRfm4zb4qtsxVbtUHBANuX+Zxo1KrR2ZD7q uzmMEI8oJ4G9Po1Oeye3unPawZA6eMEjKj2aVmx4Vzz8HmrffkO8Jau/172lk6qsxcwH 4Odbfu0sZiIrgX58wa3fP/ddC3PRj0z86ZJrcb0wIc9+KmgPTX98ajRv2Cm/WqSQPhjd gRemyBkT5DwEgNZNhUTo4arQmXSZuthKhH5Z3Z3ENFWCLHtw2T1Ue7rH6CR0RGeaDLra xgyA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705505137; x=1706109937; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version:date:message-id :sender:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=nS6nMmsu/9xE5EGiCBV7dIp6aXfPWddYayi2QGOSCU0=; b=Xms9/dRYUEbtSc8VarGuZNe1loHeH8z+7dKp2DQDJ03llh3aAC3kSI7PQua408Tv7J yWGIMs48an7mqi9AC25wmhb1HqDlE49VtlDqg2xM6354IHsAlj2YoUEC5mpl6vMoXur6 21NzyUXbCAD0Xv2hZV1UCGGGR6gT0jjZHjWuBSj4Ku6tj4njl7p0hHUhpajXwAAKqagi S67qIRc0j4i5NOvbOoe6Ja1Ix0oettHUuG7UFqs8AXp27EPhC+UNOrv9NVAnt7mDLAwg 8CP7CsxacMPF3kvl7sgK4x6UsY7Ye2Fcfn2H304FxsFDia8F6vpKEn1gId2uTV3tEmRX 1tLA== X-Gm-Message-State: AOJu0YyGZ6TM6RgWi5FvTdLVdo81nB7syAJyDmdI53zzRx6XQe6wcEuO zWjwBSkcowWbB2tfAQYSnfYNukXCY6g= X-Received: by 2002:a17:903:183:b0:1d4:c2a9:ad34 with SMTP id z3-20020a170903018300b001d4c2a9ad34mr6598766plg.113.1705505136991; Wed, 17 Jan 2024 07:25:36 -0800 (PST) Received: from ?IPV6:2600:1700:e321:62f0:329c:23ff:fee3:9d7c? ([2600:1700:e321:62f0:329c:23ff:fee3:9d7c]) by smtp.gmail.com with ESMTPSA id t16-20020a170902e85000b001d3d8c04331sm11147048plg.64.2024.01.17.07.25.34 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 17 Jan 2024 07:25:35 -0800 (PST) Sender: Guenter Roeck Message-ID: <803e93ac-dda1-41a0-a973-34f9449ccae3@roeck-us.net> Date: Wed, 17 Jan 2024 07:25:34 -0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2] Revert "usb: typec: tcpm: fix cc role at port reset" Content-Language: en-US To: Badhri Jagan Sridharan , gregkh@linuxfoundation.org, heikki.krogerus@linux.intel.com Cc: 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 References: <20240117114742.2587779-1-badhri@google.com> From: Guenter Roeck Autocrypt: addr=linux@roeck-us.net; keydata= xsFNBE6H1WcBEACu6jIcw5kZ5dGeJ7E7B2uweQR/4FGxH10/H1O1+ApmcQ9i87XdZQiB9cpN RYHA7RCEK2dh6dDccykQk3bC90xXMPg+O3R+C/SkwcnUak1UZaeK/SwQbq/t0tkMzYDRxfJ7 nyFiKxUehbNF3r9qlJgPqONwX5vJy4/GvDHdddSCxV41P/ejsZ8PykxyJs98UWhF54tGRWFl 7i1xvaDB9lN5WTLRKSO7wICuLiSz5WZHXMkyF4d+/O5ll7yz/o/JxK5vO/sduYDIlFTvBZDh gzaEtNf5tQjsjG4io8E0Yq0ViobLkS2RTNZT8ICq/Jmvl0SpbHRvYwa2DhNsK0YjHFQBB0FX IdhdUEzNefcNcYvqigJpdICoP2e4yJSyflHFO4dr0OrdnGLe1Zi/8Xo/2+M1dSSEt196rXaC kwu2KgIgmkRBb3cp2vIBBIIowU8W3qC1+w+RdMUrZxKGWJ3juwcgveJlzMpMZNyM1jobSXZ0 VHGMNJ3MwXlrEFPXaYJgibcg6brM6wGfX/LBvc/haWw4yO24lT5eitm4UBdIy9pKkKmHHh7s jfZJkB5fWKVdoCv/omy6UyH6ykLOPFugl+hVL2Prf8xrXuZe1CMS7ID9Lc8FaL1ROIN/W8Vk BIsJMaWOhks//7d92Uf3EArDlDShwR2+D+AMon8NULuLBHiEUQARAQABzTJHdWVudGVyIFJv ZWNrIChMaW51eCBhY2NvdW50KSA8bGludXhAcm9lY2stdXMubmV0PsLBgQQTAQIAKwIbAwYL CQgHAwIGFQgCCQoLBBYCAwECHgECF4ACGQEFAlVcphcFCRmg06EACgkQyx8mb86fmYFg0RAA nzXJzu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: <20240117114742.2587779-1-badhri@google.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 1/17/24 03:47, 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. intended > 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. > Makes sense to me. Reviewed-by: Guenter Roeck > Cc: stable@vger.kernel.org > Cc: Frank Wang > Fixes: 1e35f074399d ("usb: typec: tcpm: fix cc role at port reset") > Signed-off-by: Badhri Jagan Sridharan > --- > 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; > > base-commit: 933bb7b878ddd0f8c094db45551a7daddf806e00