Received: by 2002:a05:7412:cfc7:b0:fc:a2b0:25d7 with SMTP id by7csp275398rdb; Sat, 17 Feb 2024 07:54:50 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXhzhtdfgqW7s4O8iTUVfHV1HRt140rWThj7UvqzdOEzM3Dx0gMGV6J0tHXzfAoJt+YgB5ktK1ix2baZ5V5CcSQ1LM1afrUfQozD9wp2w== X-Google-Smtp-Source: AGHT+IH8z9oiHs1MxfFUnE4cN/8fGBB+K6uP3+sqLQUoo7rLht6r/z7uECq6frA6lCOvQoN43cAM X-Received: by 2002:a17:906:344e:b0:a3c:d965:f378 with SMTP id d14-20020a170906344e00b00a3cd965f378mr5219879ejb.75.1708185290652; Sat, 17 Feb 2024 07:54:50 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708185290; cv=pass; d=google.com; s=arc-20160816; b=Pd5Pf4ZK937nOZ4/xEmgZNYEbvCnRQOrCv/B4lsURx3PBZvoGOeB+p0p1FZY7Wd5i6 umrNlvp++eF0FUbXQWVSsL8yQc5dDDbJ0f32MFOX7LH6iBK0bafW0xRwmbLnGXVfQgNC yEEvLYChe/xkJZTJptNcK0xZ8BqobRzaJ6m1opPev31SCUtmLgSQnbbuOSFkypF+Jol1 xxr2q0YgMYJRNheHLT9YvqZIAk1DDQjfujjoQnX9e5P8i8WTDmEXf3+ZK8pSK/K236Zd rFtZJg3OjBKdlehctPNXUfgY1HUvJvS16VAOHc2/qRnwN2PXf5teKHwOMqrwdGWpiuSR /AUA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:dkim-signature; bh=onwzproE1MCCOqp+1iF2KFQjt0JNCAnYflScgIoIdTM=; fh=GrV4hoagZeg9GjxyVVZ4fFoNz4AEgFEUxjXQueUBF2U=; b=WI8nlBDE9IMlBhl320WCwcmxRF9jTIuQqNzBjZPqEtg1szak+Cmn98mop5gOD54cVo p+ReB8S0aqGpRzZ986YL+B+UTinfvpOPWKLl2utceaJhyO9CuRA/Du6O1r3BXAyFkpZd pCZ7r761sNw1L0DIeLAQKJlOVJrUoM5FM/2U5PbtE48F6GpdmZgHyPpez0MLNekiVvHp tdcFWiWNxXxHXEmVtC1sXXU1x/+L/NW2HCBXR2HfJlKIIXMokg5wv62QyrzLf+0NJ1/A ImNV8Rx0smRA3e8CcQzntAiS63QUGOKYv0YO07VybBs/qMxRekVXX4VYzDL+viqtjSV/ qtVA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=NDSOL2VX; arc=pass (i=1 dkim=pass dkdomain=linuxfoundation.org); spf=pass (google.com: domain of linux-kernel+bounces-69950-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-69950-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id l12-20020a1709066b8c00b00a3d35bd280esi921197ejr.138.2024.02.17.07.54.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 17 Feb 2024 07:54:50 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-69950-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=NDSOL2VX; arc=pass (i=1 dkim=pass dkdomain=linuxfoundation.org); spf=pass (google.com: domain of linux-kernel+bounces-69950-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-69950-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.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 am.mirrors.kernel.org (Postfix) with ESMTPS id 6963B1F217FA for ; Sat, 17 Feb 2024 15:54:50 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C13177CF13; Sat, 17 Feb 2024 15:54:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="NDSOL2VX" 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 E47E77C6D2; Sat, 17 Feb 2024 15:54:38 +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=1708185279; cv=none; b=mZVSIwpMcChpHkrJ3vuFwF5I4IL7myz6yvjVwHPZekYiUUWjkUCzvKxTeUCG5hK+52rENM1CVo2j8vRsZN4/qYyUuz5w0HueqiRr0Z9g/4h+79XijC++JISGLbMmwGShXwjpgVcScy11n1bnDFmMUXjVF8mhmG5BwRO1FWZS57s= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708185279; c=relaxed/simple; bh=AI0oIAcgHf1kU8VmTSbDLh+67tm7qZdcxn90MyeuyUQ=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=B8KDIGDrhL8nf/zx+VQTSUuh7N2GuvHnuEuPY66Jr/X57iYPNR7FywAoNY6XruKYx93gb1QYOHxvjdD3m7bss3cnu8eiuJkeEhGI5sVEGUheCJL4qR0YDLnMBhLHIs7AG3npzzdgu25+1BFnZ50tVdWlKLEdjE+BweaW31k3eZk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=NDSOL2VX; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id E9246C433F1; Sat, 17 Feb 2024 15:54:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1708185278; bh=AI0oIAcgHf1kU8VmTSbDLh+67tm7qZdcxn90MyeuyUQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=NDSOL2VX2fSLI0VVwkEpb2uSWpyMrOuWblfWsjeZlStlfoKMV+EkdueEg+1oEBZre nTRvQ8YJrcSrdd0kgGFw8txsaYvqg4Kb2IK+QQiI63a8WymaDEQVSaxxMKxSiLQljA 9CP0RV73d+uWhOYaxZfPNbiAY84nJdjbEqksZOYM= Date: Sat, 17 Feb 2024 16:54:35 +0100 From: Greg Kroah-Hartman To: Mark Brown Cc: Guenter Roeck , Heikki Krogerus , Badhri Jagan Sridharan , =?iso-8859-1?Q?G=E1bor?= Stefanik , rdbabiera@google.com, amitsd@google.com, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] usb: typec: tpcm: Fix issues with power being removed during reset Message-ID: <2024021704-reattach-wiring-7405@gregkh> References: <20240212-usb-fix-renegade-v1-1-22c43c88d635@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20240212-usb-fix-renegade-v1-1-22c43c88d635@kernel.org> On Mon, Feb 12, 2024 at 06:42:13PM +0000, Mark Brown wrote: > Since the merge of b717dfbf73e8 ("Revert "usb: typec: tcpm: fix > cc role at port reset"") into mainline the LibreTech Renegade > Elite/Firefly has died during boot, the main symptom observed in testing > is a sudden stop in console output. G?bor Stefanik identified in review > that the patch would cause power to be removed from devices without > batteries (like this board), observing that while the patch is correct > according to the spec this appears to be an oversight in the spec. > > Given that the change makes previously working systems unusable let's > revert it, there was some discussion of identifying systems that have > alternative power and implementing the standards conforming behaviour in > only that case. > > Fixes: b717dfbf73e8 ("Revert "usb: typec: tcpm: fix cc role at port reset"") > Signed-off-by: Mark Brown > --- > drivers/usb/typec/tcpm/tcpm.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/usb/typec/tcpm/tcpm.c b/drivers/usb/typec/tcpm/tcpm.c > index f7d7daa60c8d..a0978ed1a257 100644 > --- a/drivers/usb/typec/tcpm/tcpm.c > +++ b/drivers/usb/typec/tcpm/tcpm.c > @@ -4876,7 +4876,8 @@ static void run_state_machine(struct tcpm_port *port) > break; > case PORT_RESET: > tcpm_reset_port(port); > - tcpm_set_cc(port, TYPEC_CC_OPEN); > + tcpm_set_cc(port, tcpm_default_state(port) == SNK_UNATTACHED ? > + TYPEC_CC_RD : tcpm_rp_cc(port)); > tcpm_set_state(port, PORT_RESET_WAIT_OFF, > PD_T_ERROR_RECOVERY); > break; > Dueling reverts, fun! :( Badhri, can you either ack this, or submit your proposed change so as to get this back working again? thanks, greg k-h