Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp2469662rdb; Fri, 8 Dec 2023 09:01:46 -0800 (PST) X-Google-Smtp-Source: AGHT+IFg/7a9OBQHzEI4g1YzbslilmyyO0epovoq3R2Yx68hj+WWEAvtI9XbZ/TxPBQL3lUJu7yY X-Received: by 2002:a17:902:ed04:b0:1d1:ce46:f06d with SMTP id b4-20020a170902ed0400b001d1ce46f06dmr332249pld.14.1702054906576; Fri, 08 Dec 2023 09:01:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702054906; cv=none; d=google.com; s=arc-20160816; b=gHzVQcp0x1c0F/s7Slv+i4zI0PnXxGGtne99PZbNwWjGLPhKF4Tj5YR/HAg4UKVO/u /fbkXK2+W7xIE2MqNPo2XYhyWnHjH2Fz7nZ2aRgU6NOWxMc14UTG6LBjAatUv+uhearf 5LtowwQSpuW24nqB+PZU6zzrtSgvWivB/pf4WJyY80/3ZVkVTBQPpIYSiDuDm3cM6Pk0 Zszre3RoFCr5mXnnkZiHYrcDTFLKzNKWvD0B79mwbvkM7B9hKn9T+ighEyAMd5eOuY0R q5HEq9NxlYzoYYd6O0C8Xlx7G6r6iEPjLugG9oYIRjjJQZAtANvWEZZ99qXJ9pfDW4zQ CJ6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:autocrypt :from:references:cc:to:content-language:subject:user-agent :mime-version:date:message-id:sender:dkim-signature; bh=3qxD1epj1HHoFNOJFgo5fyFvM7xj2UBgpcmw6x6N0iM=; fh=FANy5izJD6AK2zKUPqlIWChzqRoRLNjvzMnYHK8//rA=; b=HnWNsxhOLnzB2qOkOXDuyaUuM0VtcqKz+v2zxD7E5Rz2zIXKQrMhp4xrgFSBVt89LA 6HAgveHy7YfxCqQm/pz3dUZNHsdu7bJiusjvmdzxMFZRxYdc+jULa/EMTvaHhes8fbaX aNm6uvMyQcuZ7oRyXnevwFhWXsGhMd0HIYgWxsQT4A7Tyo51fS/R1u/blExExJXCo/lm BmTAvuq7/yJfSJcrgNgSVrx4y7+IxbV+mW8hOIDw0Y/oUarn55tirDRmjFLdh3xIO0Xw oRJog13JHgqwME0fYbUMoq/1kXPEIQirmDx0dcwZWSe/zL6En7t8ulkpM+wCMt7wh0mZ lDjA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=JJ8iL4bL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id d4-20020a170902b70400b001cfcf3dd310si1806194pls.505.2023.12.08.09.01.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Dec 2023 09:01:46 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=JJ8iL4bL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 286878081F57; Fri, 8 Dec 2023 09:00:39 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233703AbjLHRAX (ORCPT + 99 others); Fri, 8 Dec 2023 12:00:23 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52090 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232094AbjLHRAV (ORCPT ); Fri, 8 Dec 2023 12:00:21 -0500 Received: from mail-oi1-x22a.google.com (mail-oi1-x22a.google.com [IPv6:2607:f8b0:4864:20::22a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4861498; Fri, 8 Dec 2023 09:00:28 -0800 (PST) Received: by mail-oi1-x22a.google.com with SMTP id 5614622812f47-3b8b5faa15bso1313514b6e.1; Fri, 08 Dec 2023 09:00:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1702054827; x=1702659627; 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=3qxD1epj1HHoFNOJFgo5fyFvM7xj2UBgpcmw6x6N0iM=; b=JJ8iL4bLB04NxR0uNY/BW+IqtzIQOzPz80lG6FVz2TLs/rXsAOuc3c94iV6sbbsXiz xxT7bh0PbUFZ/H5WSbHeO4nZpCWeV/Vp6orbHC0GVFOiri1JGw0CcNdoC8/y1R1eIuYj W7jTKegzAJq2JFHwehxEjprQ9yUjvYSQhSLu2/MjoX4W3T+oU/gXl6kfpeLp1XzAE6Ly McdDOSLhdAAY7oMil7aTF9UPHoNuO+Fn14KKYCV9/7xJhgYyZh/Be/VDsJDRzw/oEVdc ujpqHCHKYcMydOGgYfE27qER8xL+2wEXdpp1D4X/Oi1KMZxCtvnUWSp75vY9tDfDGzuL cXdA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702054827; x=1702659627; 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=3qxD1epj1HHoFNOJFgo5fyFvM7xj2UBgpcmw6x6N0iM=; b=f6kad1TAiXXZsAeG1hOnTuNQCgYp5k6tOGazqOwJ7UkMfWWFlhMpWL82gKzHs1VsbZ iH6qmOb622t5c1UlCqOmAzNyCII7Tf/PyE/eMWJCuuvtN8yS7tOeeruRulw62THKSPiW ulZnn48bjlEipmSw0EVggE0P3gpK4bo5r7aRbxGMmtauqB5MPSlqYWY3LUjfh5RJBppC Tte0bK49bcQsdY9NpmUSp5efog2uzRS06h/OhG30tWyBCVXYd1bo3rUsNkJjAmc+2Zh+ lpxW7oYDossGx+1IBW3cHQvv7HHVQSPgW75S+yHx8H3ZwDCGRPYNCuPoRJztE6T9jjaG x13A== X-Gm-Message-State: AOJu0Yw+k2pVuLlXTLkdhfucm+FQ370gajYTZI4MsW8GhJIN6s7lIm/V GsDhIIfE8A0pgkg757S0z2Rh5YocY/Y= X-Received: by 2002:a05:6808:1d7:b0:3b9:e33b:bccd with SMTP id x23-20020a05680801d700b003b9e33bbccdmr268663oic.119.1702054827565; Fri, 08 Dec 2023 09:00:27 -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 k13-20020a54470d000000b003b8b262a347sm376045oik.7.2023.12.08.09.00.26 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 08 Dec 2023 09:00:27 -0800 (PST) Sender: Guenter Roeck Message-ID: <9bbf8021-9cb7-4daa-837d-0501e5230135@roeck-us.net> Date: Fri, 8 Dec 2023 09:00:25 -0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v1] usb: typec: tcpm: Query Source partner for FRS capability only if it is DRP Content-Language: en-US To: Kyle Tso , heikki.krogerus@linux.intel.com, gregkh@linuxfoundation.org Cc: badhri@google.com, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org References: <20231205074747.1821297-1-kyletso@google.com> From: Guenter Roeck Autocrypt: addr=linux@roeck-us.net; keydata= xsFNBE6H1WcBEACu6jIcw5kZ5dGeJ7E7B2uweQR/4FGxH10/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/T0HQpmiPTqQcIaG/edgKVTUjITfA7AJMKLQHgp04Vylb+G6jocnQQX JqvvP09whbqrABEBAAHCwWUEGAECAA8CGwwFAlVcpi8FCRmg08MACgkQyx8mb86fmYHNRQ/+ J0OZsBYP4leJvQF8lx9zif+v4ZY/6C9tTcUv/KNAE5leyrD4IKbnV4PnbrVhjq861it/zRQW cFpWQszZyWRwNPWUUz7ejmm9lAwPbr8xWT4qMSA43VKQ7ZCeTQJ4TC8kjqtcbw41SjkjrcTG wF52zFO4bOWyovVAPncvV9eGA/vtnd3xEZXQiSt91kBSqK28yjxAqK/c3G6i7IX2rg6pzgqh hiH3/1qM2M/LSuqAv0Rwrt/k+pZXE+B4Ud42hwmMr0TfhNxG+X7YKvjKC+SjPjqp0CaztQ0H nsDLSLElVROxCd9m8CAUuHplgmR3seYCOrT4jriMFBtKNPtj2EE4DNV4s7k0Zy+6iRQ8G8ng QjsSqYJx8iAR8JRB7Gm2rQOMv8lSRdjva++GT0VLXtHULdlzg8VjDnFZ3lfz5PWEOeIMk7Rj trjv82EZtrhLuLjHRCaG50OOm0hwPSk1J64R8O3HjSLdertmw7eyAYOo4RuWJguYMg5DRnBk WkRwrSuCn7UG+qVWZeKEsFKFOkynOs3pVbcbq1pxbhk3TRWCGRU5JolI4ohy/7JV1TVbjiDI HP/aVnm6NC8of26P40Pg8EdAhajZnHHjA7FrJXsy3cyIGqvg9os4rNkUWmrCfLLsZDHD8FnU mDW4+i+XlNFUPUYMrIKi9joBhu18ssf5i5Q= In-Reply-To: <20231205074747.1821297-1-kyletso@google.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email 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 (agentk.vger.email [0.0.0.0]); Fri, 08 Dec 2023 09:00:39 -0800 (PST) On 12/4/23 23:47, Kyle Tso wrote: > Source-only port partner will always respond NOT_SUPPORTED to > GET_SINK_CAP. Avoid this redundant AMS by bailing out querying the FRS > capability if the Source port partner is not DRP. > > Signed-off-by: Kyle Tso Reviewed-by: Guenter Roeck > --- > 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 50cbc52386b3..192c103e0d10 100644 > --- a/drivers/usb/typec/tcpm/tcpm.c > +++ b/drivers/usb/typec/tcpm/tcpm.c > @@ -4401,7 +4401,8 @@ static void run_state_machine(struct tcpm_port *port) > tcpm_set_current_limit(port, tcpm_get_current_limit(port), 5000); > tcpm_swap_complete(port, 0); > tcpm_typec_connect(port); > - mod_enable_frs_delayed_work(port, 0); > + if (port->pd_capable && port->source_caps[0] & PDO_FIXED_DUAL_ROLE) > + mod_enable_frs_delayed_work(port, 0); > tcpm_pps_complete(port, port->pps_status); > > if (port->ams != NONE_AMS)