Received: by 2002:a05:7412:251c:b0:e2:908c:2ebd with SMTP id w28csp183291rda; Sat, 21 Oct 2023 03:57:20 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEVsxrLIjvV3379AJSHog6/y5I99PVAmeQmeUoiEvWhtvXpUOTVBSKwBu8JI5W/m8E5qGNf X-Received: by 2002:a05:6358:91a1:b0:164:a5c0:46a5 with SMTP id j33-20020a05635891a100b00164a5c046a5mr4830784rwa.12.1697885839792; Sat, 21 Oct 2023 03:57:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697885839; cv=none; d=google.com; s=arc-20160816; b=AOqSwaF+NUZNBv04iH4TDo7JHv0nIGQaNi7D2P9fqhmI1p1qgeMl0XEfDd/p/tBEg+ hI2HhVgVqVydrImnfMZtZcbIcH6ofeB+6taP4aW/9teKRyz7gYxhvw3snzv89KAJJznH CoIN+gYJnhYVPHe+rlIwU+IxGuELj02jSlNgwk1M1LJL/H3ff4pW8TJmWkNq6gwWfyGR yZ4om3YdUUt3OE7KXyGLxZmJHHnjthgMuKfi5BnMaQTrrVqT4YSD1xuXvfnNtDEpi075 s0T0RbS3tky4ZKihwi4GlBIqhU7BwybvR0G25K26fPmPDZhaZ88Wq3m7X2hMLZ246xLi ABJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=3ALjrTVYnlS3kJ4i9bC8Nz+AQm/gjLFpSPgqkjoNuM4=; fh=SFegDJiWPSmwuY0n2MIfQBNoqlQa/XZBjZ5z8VXB1tA=; b=h0oYXEfL8mSWZl7uTsN1WoBBP4zt/IAAi5o3Ko7XkYCFNoYg6p7eTH3ERKbKLVwANS mKQsT0NHsZDOSUbBvyVUIjs3QvGBEDGOuxt6NY5s1cT0+D4IoCxE4Jp0KPFGyHCbqvhE KYKcOeRBaew9q5LNco10S/J+YngkYUiKdBMHjZhIHtkY/dQ7PxfJgVvwVqinrMjsoYXY E59kNKCNyGNFkLm74S50VcYhpZIxCB5/jQNsbMdUO3i4XZOdrFXROY6C/cBK3F9ElSWZ l4+8uFE6/vLbMr7rKazj0m/t0rizDGW8xv8KhaabrSPiCGzqa3bn6H0EcXX+pacYzb1t s/7g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=bvtPBpZi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id l69-20020a638848000000b00573fc6a17dbsi3299411pgd.435.2023.10.21.03.57.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 21 Oct 2023 03:57:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=bvtPBpZi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id E07E481CE102; Sat, 21 Oct 2023 03:57:18 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229583AbjJUKwi (ORCPT + 99 others); Sat, 21 Oct 2023 06:52:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35430 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231195AbjJUKwh (ORCPT ); Sat, 21 Oct 2023 06:52:37 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 736D1D67; Sat, 21 Oct 2023 03:52:32 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B7B14C433C8; Sat, 21 Oct 2023 10:52:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1697885552; bh=1/sqY5ouFW77ZgAiX7qtgL224gkKvkoR4+se6FLQZ7U=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=bvtPBpZiw3X9UCfUJlXb6NqGxYSwl++0OUWk17um8ZcdnKaITnt//xDuC2WjkArbk zA2//vny6CyaePnLyKYBAuNiOPcIYJkd+pePDf3Ayz7UzT1lfG9EUzCkDo0jBWjibF R/MFY0A+HoxOMO4g7i6LsweMpQwmuHctqXJ1Tszg= Date: Sat, 21 Oct 2023 12:52:29 +0200 From: Greg KH To: Badhri Jagan Sridharan Cc: linux@roeck-us.net, heikki.krogerus@linux.intel.com, kyletso@google.com, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, rdbabiera@google.com, amitsd@google.com, stable@vger.kernel.org Subject: Re: [PATCH v2] usb: typec: tcpm: Fix sink caps op current check Message-ID: <2023102103-porthole-viscous-340c@gregkh> References: <20231015035838.2207567-1-badhri@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231015035838.2207567-1-badhri@google.com> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Sat, 21 Oct 2023 03:57:19 -0700 (PDT) On Sun, Oct 15, 2023 at 03:58:38AM +0000, Badhri Jagan Sridharan wrote: > TCPM checks for sink caps operational current even when PD is disabled. > This incorrectly sets tcpm_set_charge() when PD is disabled. > Check for sink caps only when PD is enabled. > > [ 97.572342] Start toggling > [ 97.578949] CC1: 0 -> 0, CC2: 0 -> 0 [state TOGGLING, polarity 0, disconnected] > [ 99.571648] CC1: 0 -> 0, CC2: 0 -> 4 [state TOGGLING, polarity 0, connected] > [ 99.571658] state change TOGGLING -> SNK_ATTACH_WAIT [rev3 NONE_AMS] > [ 99.571673] pending state change SNK_ATTACH_WAIT -> SNK_DEBOUNCED @ 170 ms [rev3 NONE_AMS] > [ 99.741778] state change SNK_ATTACH_WAIT -> SNK_DEBOUNCED [delayed 170 ms] > [ 99.789283] CC1: 0 -> 0, CC2: 4 -> 5 [state SNK_DEBOUNCED, polarity 0, connected] > [ 99.789306] state change SNK_DEBOUNCED -> SNK_DEBOUNCED [rev3 NONE_AMS] > [ 99.903584] VBUS on > [ 99.903591] state change SNK_DEBOUNCED -> SNK_ATTACHED [rev3 NONE_AMS] > [ 99.903600] polarity 1 > [ 99.910155] enable vbus discharge ret:0 > [ 99.910160] Requesting mux state 1, usb-role 2, orientation 2 > [ 99.946791] state change SNK_ATTACHED -> SNK_STARTUP [rev3 NONE_AMS] > [ 99.946798] state change SNK_STARTUP -> SNK_DISCOVERY [rev3 NONE_AMS] > [ 99.946800] Setting voltage/current limit 5000 mV 500 mA > [ 99.946803] vbus=0 charge:=1 > [ 100.027139] state change SNK_DISCOVERY -> SNK_READY [rev3 NONE_AMS] > [ 100.027145] Setting voltage/current limit 5000 mV 3000 mA > [ 100.466830] VBUS on > > Cc: stable@vger.kernel.org > Fixes: 34fde9ec08a3 ("FROMGIT: usb: typec: tcpm: not sink vbus if operational current is 0mA") This is obviously not a valid git id in Linus's tree, and our tools reject it :( thanks, greg k-h