Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp120929pxb; Tue, 2 Feb 2021 00:28:45 -0800 (PST) X-Google-Smtp-Source: ABdhPJzTbe061pVH0L3bsynLwO8ri8KSsFTblfv+rFEGfUPdM/xhYYQjuOH+wxxN4eenk7QiJfKh X-Received: by 2002:a05:6402:27d1:: with SMTP id c17mr22765840ede.109.1612254525145; Tue, 02 Feb 2021 00:28:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612254525; cv=none; d=google.com; s=arc-20160816; b=QZMq2FJ2E1W1kcl118sNmnRpjdpOduUHm+sl+Li1wN1Ommh7odPgMFfMAZORMeyN5D WLokObfpyF11mhufSvFTiBUEoH98fuTf67CLdzCQb/DV6OQdR2DKspC8Em2QepfXtVfR 9Ln/rfU0FD1bwOuYMBZEdHD+4SgZ/mI3agXbcwFO+rs5Lrr0fltEXoEy1BzjfH+wIMti H9o8PZXrvo4Gwjwzlge9sdolUgRGrcSu6oIEJNAKHCrXJdaWK5VX9nii3AmbJo0HJFBN qgaMo40i0T/H3+Ov2S3gEqnku/5XHg9NXCPGpoH7bt3RickhZ79CrRpBsxUSzW7hVNUu 2ltw== 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:ironport-sdr :ironport-sdr; bh=GwPipUPr2zuX9Mafq17mxzlfv1SNWWRCVJlS/kGBmsg=; b=ZbttP1XvaJD8bLk4xk9Upg9nRd2AW7YlSA963cPGhLdsaIxVMqFIomurCIpsxeJQHu MwXfRHeYorgiJaUnO0bR28iIitCZnI6R7vw2uPL8+lPD25DbnYmBq3L9yvE+/xcui9BK M8c+GViZYZQeIarDY80ojXGdBOBDM76mkU1ZRuZMY9uEVtSiM/031Y8dIcpIpQuB3/t3 ozOIvmWWkQILF2BqTuTKkGEd+Kl9ZDnuvG2ZP7R3lj/h4VaHapQnSdAYPqfsWWrqZiV+ nX/z++r0B7VkxYMhNvTTylG+4CfKP6TLyYDsY71RYacLIBFOylUoDEimYXYJ3gCCMngw fxsQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id jg13si14113424ejc.126.2021.02.02.00.28.01; Tue, 02 Feb 2021 00:28:45 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232303AbhBBI1X (ORCPT + 99 others); Tue, 2 Feb 2021 03:27:23 -0500 Received: from mga17.intel.com ([192.55.52.151]:32311 "EHLO mga17.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232592AbhBBI07 (ORCPT ); Tue, 2 Feb 2021 03:26:59 -0500 IronPort-SDR: LXc+73g490csAUslmTaZ8WdeIir4ywLmdZY6Xg7z3XZb00ZIhPSuUk97YMJcO7m745hewhx4zf E3BEjP3ZDhcQ== X-IronPort-AV: E=McAfee;i="6000,8403,9882"; a="160583550" X-IronPort-AV: E=Sophos;i="5.79,394,1602572400"; d="scan'208";a="160583550" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Feb 2021 00:25:13 -0800 IronPort-SDR: 9G5TpLdVoAZ64S15wl7c3zTe2XvX6oKeCc4Knq1Nx2aJ3d9E2FnGgtpvTP8nvxzHCktptUvW01 FqdFW9FLU0ZQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.79,394,1602572400"; d="scan'208";a="479482501" Received: from kuha.fi.intel.com ([10.237.72.162]) by fmsmga001.fm.intel.com with SMTP; 02 Feb 2021 00:25:10 -0800 Received: by kuha.fi.intel.com (sSMTP sendmail emulation); Tue, 02 Feb 2021 10:25:09 +0200 Date: Tue, 2 Feb 2021 10:25:09 +0200 From: Heikki Krogerus To: Badhri Jagan Sridharan Cc: Guenter Roeck , Greg Kroah-Hartman , Kyle Tso , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v1] usb: typec: tcpm: Set in_ams flag when Source caps have been received Message-ID: <20210202082509.GD1433721@kuha.fi.intel.com> References: <20210202033859.258491-1-badhri@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210202033859.258491-1-badhri@google.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Feb 01, 2021 at 07:38:59PM -0800, Badhri Jagan Sridharan wrote: > Receiving the first packet in an AMS sequence signals the > beginning of AMS. Set in_ams flag to true when SRC_CAPS are > received during POWER_NEGOTIATION AMS. > This fixes the failure flagged while running TD.PD.SNK.E9 > compliance test. > > >From Deterministic PD compliance MOI spec: > TD.PD.SNK.E9. GetSinkCap in Place of Accept > Description: > As Provider, the Tester intentionally sends a GetSinkCap message in place > of Accept message and verifies the UUT will send a SoftReset and recover > from the error. > Steps: > a) Run PROC.PD.E1 Bring-up according to the UUT role. > b) The Tester cycles VBus. > c) The Tester sends a Source Capabilities message to the UUT. > d) Upon receipt of a Request message from the UUT, the Tester replies with > a GoodCRC message. > e) The Tester sends a GetSinkCap message to the UUT. > f) If a SoftReset is not received within 15 ms after the GetSinkCap EOP was > sent, the test fails. > g) If a SoftReset is received timely, the Tester replies with an Accept > message. > h) The Tester sends Source Capabilities message to the UUT repeatedly until > nCapsCount reached or a GoodCRC is received. If nCapsCount reached, the > test fails. > i) If a Request is not received timely within 30 ms after the GoodCRC EOP > corresponding to Source Capabilities message was received, the test > fails. > > Signed-off-by: Badhri Jagan Sridharan Reviewed-by: Heikki Krogerus > --- > drivers/usb/typec/tcpm/tcpm.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/usb/typec/tcpm/tcpm.c b/drivers/usb/typec/tcpm/tcpm.c > index 0afd8ef692e8..b3e07d9b7597 100644 > --- a/drivers/usb/typec/tcpm/tcpm.c > +++ b/drivers/usb/typec/tcpm/tcpm.c > @@ -2243,6 +2243,7 @@ static void tcpm_pd_data_request(struct tcpm_port *port, > * handled. > */ > port->ams = POWER_NEGOTIATION; > + port->in_ams = true; > tcpm_set_state(port, SNK_NEGOTIATE_CAPABILITIES, 0); > } else { > if (port->ams == GET_SOURCE_CAPABILITIES) > -- > 2.30.0.365.g02bc693789-goog thanks, -- heikki