Revert "usb: typec: tcpm: reset counter when enter into unattached state after try role"
Message ID | 20240215193352.1026707-1-megi@xff.cz |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-67589-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:c619:b0:108:e6aa:91d0 with SMTP id hn25csp74678dyb; Thu, 15 Feb 2024 11:34:28 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUxPm4MWfPuVnsm4XwUZqAZLhRbx+Por/R3GqAyEQiU71mJLCyfQl6iLzJ1b2xS6NKIZ6KzUSzM78/Ekr029Y/X3TYzKQ== X-Google-Smtp-Source: AGHT+IGRWINzYQoBG5x2OcfyHA5UmpukpQpslwYJ5XxvlqY32HpADZedUpYRhJ1tcmnVPUFbRrWS X-Received: by 2002:a05:622a:15c6:b0:42c:6795:568d with SMTP id d6-20020a05622a15c600b0042c6795568dmr3198456qty.12.1708025667889; Thu, 15 Feb 2024 11:34:27 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708025667; cv=pass; d=google.com; s=arc-20160816; b=xPgsc83wJBtiT2IQounDFeWQ5wBeRinqzlVDX7orlMG6Lqwal3fPn1InNEvy8wNDJd oXgiAfFx05tERdz7o7h7hR6rP2bWnxDznOl7/T4JpiuBoGNYSrsvct8x8u8G9nQincVR VV2lLRZdByaM6tNT0r0nyHRkyV0KXXg/HS2cbVaiShzWTX77cbT1jcTQvF1pjHv0pmLz 5aJ3hUXOjPKrEbtHrUFd6yhUS8wv2flor9cYzFRL1ayzRBewvJrSWEEUXi0F8Qcys6PC 7lCo94wwZ7O7F8G2EIMJJ2pUqN8fxwvYsu+3sj8pXtpNKZYprv/Y2y0QNnLEKrC4kF5y nuLg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=Jk37+nLVWDV9af4rNfPFbZ3MtCowlPMO1ZEypY/JJBI=; fh=a1kzkIFaww/2WfNllHgcAkHrBWafO7ZK97WHcWyBezM=; b=g5SL5ED2OsSyCEq6X63OvxDWzIzR6Vqt90364/X1J3i1HvTDgCF2zZbRlfGnKr2ygl qQ9fCrF6YOBryQgHniALl1YZxySPJ1p0shX1Q10ZiMfz1YXMAliEb8IZqGgyijj6vGZv oImrU6oKT0E+8ZfSeQZvJdOJrJMkVwwcckF6ueL4jfM4LoVOX2ozQ7cQOP6MCM+c49sw udIbY61EfC+QEWyv18wfLzPQzqZ9UCYLeW/ylpR1AuaGxaFJ+s9oUsNjuXXsUoXR1hJV HcR0+jUQrgS8BLY27aqjZzThqKl+LwNLf16FYfJtcbwxf6QUTHXg7nn7cxl4ILvLTI/X q3iw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@xff.cz header.s=mail header.b=g02ySvEJ; arc=pass (i=1 spf=pass spfdomain=xff.cz dkim=pass dkdomain=xff.cz dmarc=pass fromdomain=xff.cz); spf=pass (google.com: domain of linux-kernel+bounces-67589-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-67589-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=xff.cz Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id h8-20020ac87448000000b0042dbe72f60fsi1915515qtr.233.2024.02.15.11.34.27 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Feb 2024 11:34:27 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-67589-ouuuleilei=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=@xff.cz header.s=mail header.b=g02ySvEJ; arc=pass (i=1 spf=pass spfdomain=xff.cz dkim=pass dkdomain=xff.cz dmarc=pass fromdomain=xff.cz); spf=pass (google.com: domain of linux-kernel+bounces-67589-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-67589-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=xff.cz 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 A97651C2404B for <ouuuleilei@gmail.com>; Thu, 15 Feb 2024 19:34:27 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B7C7E13A864; Thu, 15 Feb 2024 19:34:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=xff.cz header.i=@xff.cz header.b="g02ySvEJ" Received: from vps.xff.cz (vps.xff.cz [195.181.215.36]) (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 CAFB31386AE; Thu, 15 Feb 2024 19:34:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.181.215.36 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708025648; cv=none; b=hwqSypCUdgYvaU3H7bCMm+ML9UqidyM3hZvWBWDzQD6fAG1frSiF+6SLFNgZbw6nVbvR+dOB6XWFR8cu+M3LLa2oy4V+kPffTkmwoGY28j+3B3p5DNtIlgVxTPFa37OsinS+iAZhNJtVRZBQGWtwdqjyNyjRkswGSAUQSVMwqKo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708025648; c=relaxed/simple; bh=pwr40pe20aNMHUfTjs/G++NlbzwOhpj6C+tL7b0oO2A=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=YUUtOERJ3epL3o/nPj2XZQFUkl7E/1VE53S9ger5MyYvaYoD8alkWdm0Sk2v2pvXhKI/7EOZNHzoC2oG981jvlIt2n3wyi005+qw2ieEGLNpEwq9QZ7dRu+kOEhdR2fUGkuFDN5Yls5FkVLHo2ynFSF9CfD7sKVjMeoqNgm25hs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=xff.cz; spf=pass smtp.mailfrom=xff.cz; dkim=pass (1024-bit key) header.d=xff.cz header.i=@xff.cz header.b=g02ySvEJ; arc=none smtp.client-ip=195.181.215.36 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=xff.cz Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=xff.cz DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=xff.cz; s=mail; t=1708025635; bh=pwr40pe20aNMHUfTjs/G++NlbzwOhpj6C+tL7b0oO2A=; h=From:To:Cc:Subject:Date:From; b=g02ySvEJW41OZpOAIQqt+yYPmbgc12PSVMzwqFuTFh0V683CfHdTtB0FHTTmmxY30 7gjC18Wmp6M36jJ5KhHgC2rNnZ+3JqpJkU1SqX6bPQp6HMImVhsPMuYyqo3wEv/UH/ s7JFEWsqUUlRSlkFF+bZmE+8JFsTwtyOytylQ6NY= From: =?utf-8?q?Ond=C5=99ej_Jirman?= <megi@xff.cz> To: linux-usb@vger.kernel.org Cc: Ondrej Jirman <megi@xff.cz>, Guenter Roeck <linux@roeck-us.net>, Heikki Krogerus <heikki.krogerus@linux.intel.com>, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, linux-kernel@vger.kernel.org (open list) Subject: [PATCH] Revert "usb: typec: tcpm: reset counter when enter into unattached state after try role" Date: Thu, 15 Feb 2024 20:33:50 +0100 Message-ID: <20240215193352.1026707-1-megi@xff.cz> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790994722440024272 X-GMAIL-MSGID: 1790994722440024272 |
Series |
Revert "usb: typec: tcpm: reset counter when enter into unattached state after try role"
|
|
Commit Message
Ondřej Jirman
Feb. 15, 2024, 7:33 p.m. UTC
From: Ondrej Jirman <megi@xff.cz>
The reverted commit makes the state machine only ever go from SRC_ATTACH_WAIT
to SNK_TRY in endless loop when toggling. After revert it goes to SRC_ATTACHED
after initially trying SNK_TRY earlier, as it should for toggling to ever detect
the power source mode and the port is again able to provide power to attached
power sinks.
This reverts commit 2d6d80127006ae3da26b1f21a65eccf957f2d1e5.
---
drivers/usb/typec/tcpm/tcpm.c | 3 ---
1 file changed, 3 deletions(-)
See https://lore.kernel.org/all/odggrbbgjpardze76qiv57mw6tllisyu5sbrta37iadjzwamcv@qr3ubwnlzqqt/
for more.
Comments
On Thu, Feb 15, 2024 at 08:33:50PM +0100, Ondřej Jirman wrote: > From: Ondrej Jirman <megi@xff.cz> > > The reverted commit makes the state machine only ever go from SRC_ATTACH_WAIT > to SNK_TRY in endless loop when toggling. After revert it goes to SRC_ATTACHED > after initially trying SNK_TRY earlier, as it should for toggling to ever detect > the power source mode and the port is again able to provide power to attached > power sinks. > > This reverts commit 2d6d80127006ae3da26b1f21a65eccf957f2d1e5. > --- > drivers/usb/typec/tcpm/tcpm.c | 3 --- > 1 file changed, 3 deletions(-) > > See https://lore.kernel.org/all/odggrbbgjpardze76qiv57mw6tllisyu5sbrta37iadjzwamcv@qr3ubwnlzqqt/ > for more. > > diff --git a/drivers/usb/typec/tcpm/tcpm.c b/drivers/usb/typec/tcpm/tcpm.c > index f7d7daa60c8d..295ae7eb912c 100644 > --- a/drivers/usb/typec/tcpm/tcpm.c > +++ b/drivers/usb/typec/tcpm/tcpm.c > @@ -3743,9 +3743,6 @@ static void tcpm_detach(struct tcpm_port *port) > if (tcpm_port_is_disconnected(port)) > port->hard_reset_count = 0; > > - port->try_src_count = 0; > - port->try_snk_count = 0; > - > if (!port->attached) > return; > > -- > 2.43.0 > > Hi, This is the friendly patch-bot of Greg Kroah-Hartman. You have sent him a patch that has triggered this response. He used to manually respond to these common problems, but in order to save his sanity (he kept writing the same thing over and over, yet to different people), I was created. Hopefully you will not take offence and will fix the problem in your patch and resubmit it so that it can be accepted into the Linux kernel tree. You are receiving this message because of the following common error(s) as indicated below: - Your patch does not have a Signed-off-by: line. Please read the kernel file, Documentation/process/submitting-patches.rst and resend it after adding that line. Note, the line needs to be in the body of the email, before the patch, not at the bottom of the patch or in the email signature. If you wish to discuss this problem further, or you have questions about how to resolve this issue, please feel free to respond to this email and Greg will reply once he has dug out from the pending patches received from other developers. thanks, greg k-h's patch email bot
On Sat, Feb 17, 2024 at 04:32:54PM +0100, Greg Kroah-Hartman wrote: > On Thu, Feb 15, 2024 at 08:33:50PM +0100, Ondřej Jirman wrote: > > From: Ondrej Jirman <megi@xff.cz> > > > > The reverted commit makes the state machine only ever go from SRC_ATTACH_WAIT > > to SNK_TRY in endless loop when toggling. After revert it goes to SRC_ATTACHED > > after initially trying SNK_TRY earlier, as it should for toggling to ever detect > > the power source mode and the port is again able to provide power to attached > > power sinks. > > > > This reverts commit 2d6d80127006ae3da26b1f21a65eccf957f2d1e5. > > --- > > drivers/usb/typec/tcpm/tcpm.c | 3 --- > > 1 file changed, 3 deletions(-) > > > > See https://lore.kernel.org/all/odggrbbgjpardze76qiv57mw6tllisyu5sbrta37iadjzwamcv@qr3ubwnlzqqt/ > > for more. > > > > diff --git a/drivers/usb/typec/tcpm/tcpm.c b/drivers/usb/typec/tcpm/tcpm.c > > index f7d7daa60c8d..295ae7eb912c 100644 > > --- a/drivers/usb/typec/tcpm/tcpm.c > > +++ b/drivers/usb/typec/tcpm/tcpm.c > > @@ -3743,9 +3743,6 @@ static void tcpm_detach(struct tcpm_port *port) > > if (tcpm_port_is_disconnected(port)) > > port->hard_reset_count = 0; > > > > - port->try_src_count = 0; > > - port->try_snk_count = 0; > > - > > if (!port->attached) > > return; > > > > -- > > 2.43.0 > > > > > > Hi, > > This is the friendly patch-bot of Greg Kroah-Hartman. You have sent him > a patch that has triggered this response. He used to manually respond > to these common problems, but in order to save his sanity (he kept > writing the same thing over and over, yet to different people), I was > created. Hopefully you will not take offence and will fix the problem > in your patch and resubmit it so that it can be accepted into the Linux > kernel tree. > > You are receiving this message because of the following common error(s) > as indicated below: > > - Your patch does not have a Signed-off-by: line. Please read the > kernel file, Documentation/process/submitting-patches.rst and resend > it after adding that line. Note, the line needs to be in the body of > the email, before the patch, not at the bottom of the patch or in the > email signature. > > > If you wish to discuss this problem further, or you have questions about > how to resolve this issue, please feel free to respond to this email and > Greg will reply once he has dug out from the pending patches received > from other developers. It's a mechanically generated revert of upstream patch. It has no authorship. I did not write it, machine did. :) But I can add a sign off for the commit message I made: Signed-of-by: Ondrej Jirman <megi@xff.cz> kind regards, o. > thanks, > > greg k-h's patch email bot
On Sat, Feb 17, 2024 at 04:40:21PM +0100, Ondřej Jirman wrote: > On Sat, Feb 17, 2024 at 04:32:54PM +0100, Greg Kroah-Hartman wrote: > > On Thu, Feb 15, 2024 at 08:33:50PM +0100, Ondřej Jirman wrote: > > > From: Ondrej Jirman <megi@xff.cz> > > > > > > The reverted commit makes the state machine only ever go from SRC_ATTACH_WAIT > > > to SNK_TRY in endless loop when toggling. After revert it goes to SRC_ATTACHED > > > after initially trying SNK_TRY earlier, as it should for toggling to ever detect > > > the power source mode and the port is again able to provide power to attached > > > power sinks. > > > > > > This reverts commit 2d6d80127006ae3da26b1f21a65eccf957f2d1e5. > > > --- > > > drivers/usb/typec/tcpm/tcpm.c | 3 --- > > > 1 file changed, 3 deletions(-) > > > > > > See https://lore.kernel.org/all/odggrbbgjpardze76qiv57mw6tllisyu5sbrta37iadjzwamcv@qr3ubwnlzqqt/ > > > for more. > > > > > > diff --git a/drivers/usb/typec/tcpm/tcpm.c b/drivers/usb/typec/tcpm/tcpm.c > > > index f7d7daa60c8d..295ae7eb912c 100644 > > > --- a/drivers/usb/typec/tcpm/tcpm.c > > > +++ b/drivers/usb/typec/tcpm/tcpm.c > > > @@ -3743,9 +3743,6 @@ static void tcpm_detach(struct tcpm_port *port) > > > if (tcpm_port_is_disconnected(port)) > > > port->hard_reset_count = 0; > > > > > > - port->try_src_count = 0; > > > - port->try_snk_count = 0; > > > - > > > if (!port->attached) > > > return; > > > > > > -- > > > 2.43.0 > > > > > > > > > > Hi, > > > > This is the friendly patch-bot of Greg Kroah-Hartman. You have sent him > > a patch that has triggered this response. He used to manually respond > > to these common problems, but in order to save his sanity (he kept > > writing the same thing over and over, yet to different people), I was > > created. Hopefully you will not take offence and will fix the problem > > in your patch and resubmit it so that it can be accepted into the Linux > > kernel tree. > > > > You are receiving this message because of the following common error(s) > > as indicated below: > > > > - Your patch does not have a Signed-off-by: line. Please read the > > kernel file, Documentation/process/submitting-patches.rst and resend > > it after adding that line. Note, the line needs to be in the body of > > the email, before the patch, not at the bottom of the patch or in the > > email signature. > > > > > > If you wish to discuss this problem further, or you have questions about > > how to resolve this issue, please feel free to respond to this email and > > Greg will reply once he has dug out from the pending patches received > > from other developers. > > It's a mechanically generated revert of upstream patch. It has no authorship. > I did not write it, machine did. :) > > But I can add a sign off for the commit message I made: > > Signed-of-by: Ondrej Jirman <megi@xff.cz> You have to do so. And you need a Fixes: and cc: stable tag too, right? Please fix up and send a v2 properly. thanks, greg k-h
On 2/17/24 08:03, Greg Kroah-Hartman wrote: >> It's a mechanically generated revert of upstream patch. It has no authorship. >> I did not write it, machine did. :) >> >> But I can add a sign off for the commit message I made: >> >> Signed-of-by: Ondrej Jirman <megi@xff.cz> > > You have to do so. > It is not a valid argument to start with. "git revert" has a "-s" option to sign reverts for that very purpose. Guenter
diff --git a/drivers/usb/typec/tcpm/tcpm.c b/drivers/usb/typec/tcpm/tcpm.c index f7d7daa60c8d..295ae7eb912c 100644 --- a/drivers/usb/typec/tcpm/tcpm.c +++ b/drivers/usb/typec/tcpm/tcpm.c @@ -3743,9 +3743,6 @@ static void tcpm_detach(struct tcpm_port *port) if (tcpm_port_is_disconnected(port)) port->hard_reset_count = 0; - port->try_src_count = 0; - port->try_snk_count = 0; - if (!port->attached) return;