Received: by 2002:a05:7412:8d1c:b0:fa:4c10:6cad with SMTP id bj28csp340096rdb; Wed, 17 Jan 2024 03:51:20 -0800 (PST) X-Google-Smtp-Source: AGHT+IFIJUXtzPhE6v2tSu5u7CqdZofwdW5c7PILWhurZ2P2lSmUPgXi6hyxUWT8BtczJeq5IOvO X-Received: by 2002:a05:622a:100f:b0:429:e985:94c8 with SMTP id d15-20020a05622a100f00b00429e98594c8mr6502505qte.79.1705492280087; Wed, 17 Jan 2024 03:51:20 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705492280; cv=pass; d=google.com; s=arc-20160816; b=CEKb81yQdSe7i6BAkoBuKGPv/oJpKUJg9qYchCCm76ONTNXPDiBhNQEi0EsjZTY/8P UY/iVnWPg7jXpI09BkrZHVFyEFTOZxLthVbqAfm+ZKKflx1L5QYken1AGe3JG5atB+0n HG/r4g6/O/bkmEsVa4Yy+qOqIP0sp96MuJbm0naRDKbFO3nCf4z/EzbFJa3zmq7wtjUi oyFve14ZyM60u6bZWejws5zSb23PPmDPfDptThgGyHTYQQlolaahNGMjC9m4XG6Rtvlw bT3MhS0XfD3PIv/czQLpN4azNnM41GkSQAp1W6Yq4q8hA61W5nuYSddm/5HSdkG295Et 7ymA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=RXdybsjFtwqNXBEWu9TqcaPjVsWwWYgbT9rFiwsm5no=; fh=WbUPz9pIWXXrLgK97bEznghPOzkSwg9bXkSJD19hKUY=; b=kY1Bb+zllrBvSILEEBoprlQztItSgwizMGYvqunIWaeY439Qguh1QAwcb2y1IugEvb XZPUf9kQdMvHodqR432DutloSJXROsruqG9nZIf/M86x5vzdXJ8DXNqjh+/UojHKdYA9 mRYAxjnKYrJB6IpcFR13smF18i5Z06pdzLtfsXUgHCLiidy58dYNNRbiibmMbHkDNCn0 taOvbDwGTVfeh34u8ypgLbJvnFGEiakW4PfGlfBAxiaBz2VjSgu2AjVHYUxARUF/wv/d TyMkX0bM/JWGY5RSoP2Y3kVEevDmYXaqz+QljPkiD578pJOsorJMOCFd2f9WBS2cnh7v 2E9A== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=JpoLOPGm; arc=pass (i=1 spf=pass spfdomain=google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-28931-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-28931-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id z6-20020a05622a060600b004299cbc2a95si11753058qta.493.2024.01.17.03.51.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Jan 2024 03:51:20 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-28931-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=JpoLOPGm; arc=pass (i=1 spf=pass spfdomain=google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-28931-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-28931-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com 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 D05B71C2430C for ; Wed, 17 Jan 2024 11:51:19 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2A0381DFD8; Wed, 17 Jan 2024 11:51:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="JpoLOPGm" Received: from mail-ot1-f48.google.com (mail-ot1-f48.google.com [209.85.210.48]) (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 0ADE81DFC9 for ; Wed, 17 Jan 2024 11:51:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.48 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705492272; cv=none; b=WuzAXfDa05QdEyhepqH2oOeSJ5s9CIH7+1Wf2frSXOskx6RDqxqZOYBUStU/aJ9QS5s76i8BltAQWcm2eGCkldSkJLpI1N/ZrEnlcgOTEBSrl15bQ9HwhUuutMNUVDi3fTF2xCllX+6N5edBSZg150IAKL1PEM4jFRXqCax2xoI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705492272; c=relaxed/simple; bh=OPtTkiouAlCWqpcLmAgIIYVnBKLZUCesR+RlDZ2ERHA=; h=Received:DKIM-Signature:X-Google-DKIM-Signature: X-Gm-Message-State:X-Google-Smtp-Source:X-Received:MIME-Version: References:In-Reply-To:From:Date:Message-ID:Subject:To:Cc: Content-Type:Content-Transfer-Encoding; b=QLcEztdlQFVnv8ZMN2T37tBcNB0YCM3E6Eqrx9lZWU449tVnzKaasMdvxlMBzULSB8O0WOvj1xlAf6o0SOzhS6LfnI/9ZxHvai1S+RNHnXcvM97f4VnqyaB0SBQ3mwpkUBulI+LtMpfFs7McyS1grsRY+eHyeZf4r9a4xkxxVlE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=JpoLOPGm; arc=none smtp.client-ip=209.85.210.48 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=google.com Received: by mail-ot1-f48.google.com with SMTP id 46e09a7af769-6e0af93fdaaso3053962a34.3 for ; Wed, 17 Jan 2024 03:51:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1705492270; x=1706097070; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=RXdybsjFtwqNXBEWu9TqcaPjVsWwWYgbT9rFiwsm5no=; b=JpoLOPGm4m5YCEANyVIzDcTDaDRQMbzQgUed+lnaAdUWKOQy+FQXnBp2ucAuzYcEVs 3IdL3hrZbq/iOhDihEqZPSNkfF5XmCEoDoqBtO7mBDFW3WWW3s7GFdDUJFdMiWdy/p/q vmALUNaZZXWr/ykYp1725OShu+XaHEyu36u7MusUcVvVirE9WxNVes1g7Zyl45EYqSsC Wq/RWfhUhQlCI2vkhp4v48FEJW2PtabX66mwkipDy5iTee4gdwQyc70UMrFxI9Jw0kV1 9nS0x/cDHbpSai1lHjsZrr4Zq7xsEKbyhZClzRLNOfXsO1edT85zfEawRkUnExMFRNQs cIkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705492270; x=1706097070; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=RXdybsjFtwqNXBEWu9TqcaPjVsWwWYgbT9rFiwsm5no=; b=qJGTTlYotQ/2Jukt22+PhBOnDDrHdGuqoGgnsin70au8Fh/ePYI6j6g8DwwsT6Qp6E nui4TG+e3JDFq2fuoKEKe3C2f+Xfg8WL5olBjJbHBVEVe3XgyhmBkbMSUF8bfbVM7Jwv p3ow/nRsyxxb0dND9sXiAJMs6IkCjLF9vyWG8WCvGaPIcEuTeF4KQryiFt4Hk+rsLE+w ifbGpRnpaMWzDoVXYoxEZky43XxNXnc/DFw0zabYu9An12PcTCv0eaZcUAJbhYHgzf7R bGZNjpBI36FPT0oEmKieNDm+6HStbTVycZet2IHo+rQOpU/GpEhSps/RrHM9DbNHHIr8 KnMg== X-Gm-Message-State: AOJu0YxaJEd8SVH6KUaH2D4h9ccq9AQKOzXyH8AqcEw/ve+gC2682J4P 66yux3RccwOoA2E0lie7ty97MnZV4FEToo9lLe2jqQgtOHsX X-Received: by 2002:a05:6359:4293:b0:175:c21c:87c4 with SMTP id kp19-20020a056359429300b00175c21c87c4mr9260102rwb.53.1705492269980; Wed, 17 Jan 2024 03:51:09 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240117113806.2584341-1-badhri@google.com> In-Reply-To: <20240117113806.2584341-1-badhri@google.com> From: Badhri Jagan Sridharan Date: Wed, 17 Jan 2024 03:50:33 -0800 Message-ID: Subject: Re: [PATCH v1] Revert "usb: typec: tcpm: fix cc role at port reset" To: gregkh@linuxfoundation.org, linux@roeck-us.net, 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, stable@kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi all, Please ignore this patch as I sent a V2 which fixes the commit message. Thanks, Badhri On Wed, Jan 17, 2024 at 3:38=E2=80=AFAM 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@kernel.org > 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 *por= t) > break; > case PORT_RESET: > tcpm_reset_port(port); > - tcpm_set_cc(port, tcpm_default_state(port) =3D=3D SNK_UNA= TTACHED ? > - 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 > -- > 2.43.0.429.g432eaa2c6b-goog >