Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp409573pxu; Tue, 1 Dec 2020 14:33:33 -0800 (PST) X-Google-Smtp-Source: ABdhPJySimljJQ2EhL7txUhgXpJTsoFZAdUXF1VBCKrA3nxs0HhRUD+nwLn2wpS0QzMGXW1CrvSm X-Received: by 2002:a17:906:f1cc:: with SMTP id gx12mr5098782ejb.164.1606862013793; Tue, 01 Dec 2020 14:33:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606862013; cv=none; d=google.com; s=arc-20160816; b=KbArAdblPa/bPH3WnfBm9uixqgiQXEDkfOkOeD50eOfasOY1V4sWU62KcL/8NsH+lg YSU01L0awy5KPTdz3sf8Lz1CWWtdadP3lxP8i3b+2qDrWWMUwDWVqYUgm4J/UWoKXzAy CzwDHfEPc1F29lVDqAuN2+qQuwjQm68zwBuJnwExE00tmb8ZMJE6XAIu7bmWna2biUYN +eoc31dVOIseXTJGxwTKIalSxr5Xf/a/oF6Lk7GsLsWpjTbX76RsN8XfYjKQdqe3Ullw mAI5ykdN4KlntPyapT/f+QOo01ifwmGc8VxfHya6n/M2zKdmPxddFgadKi+OaD+5n4JQ JUqw== 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=uAj6ex38isy41r5Cr0c1ZjPlzKYcFP6cBUU/JHKqaZw=; b=OfrDA6UmrbS8pQ60FXeL22860FmMz7IJgWjwMXX1h+aCwUHQrCqBYDG4/PnyWiqNtH IM8ys8k5bt9KBMPPBRmb0Ler7YkrvrF9JDbkGPzQJpHSYKmK9jYpe/N/Tly6eQ/0kMGg uhV0V5+Te3eXhBgfySZzMDXLBtomyc4PJKDl+jUu7c+0mX2M0wg0268M7uMem8TAdRX4 9VBAahelNHiXtrTJj19FzShEgdso5IBQeDi0ejPcC5gfz9NwgVpPpIthwEW5WnvWIVsf /mvw/uPDyECVvjZPgpHj8+Vs/4zWHYI7+vEfGQTiAwqc4cp4gIIz0EK4pmuZp9KM9Bsh 914Q== 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 u8si777562eje.57.2020.12.01.14.33.11; Tue, 01 Dec 2020 14:33:33 -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 S1729870AbgLAKdr (ORCPT + 99 others); Tue, 1 Dec 2020 05:33:47 -0500 Received: from mga09.intel.com ([134.134.136.24]:40453 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726134AbgLAKdr (ORCPT ); Tue, 1 Dec 2020 05:33:47 -0500 IronPort-SDR: svWi1n0YeJw8g9xW6g561C0tDdaYtVMR2ygNYjD547UnwkbYX2YXMQ/kBQ1iAnr02rUEXZLKSS nSbQcHHYn4kg== X-IronPort-AV: E=McAfee;i="6000,8403,9821"; a="172963547" X-IronPort-AV: E=Sophos;i="5.78,384,1599548400"; d="scan'208";a="172963547" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Dec 2020 02:32:01 -0800 IronPort-SDR: T/rXxtx3qMZyzxQo9aQcTNzrrtAyXDYW+T1LjXV+lwq9+eLxagowcqUzXTMazJ5AIVVtOCOI9R +0gBCU4Zreqg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.78,384,1599548400"; d="scan'208";a="434617560" Received: from kuha.fi.intel.com ([10.237.72.162]) by fmsmga001.fm.intel.com with SMTP; 01 Dec 2020 02:31:58 -0800 Received: by kuha.fi.intel.com (sSMTP sendmail emulation); Tue, 01 Dec 2020 12:31:57 +0200 Date: Tue, 1 Dec 2020 12:31:57 +0200 From: Heikki Krogerus To: Badhri Jagan Sridharan Cc: Guenter Roeck , Greg Kroah-Hartman , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v1 1/4] usb: typec: tcpm: Pass down negotiated rev to update retry count Message-ID: <20201201103157.GA3191259@kuha.fi.intel.com> References: <20201201042237.414235-1-badhri@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201201042237.414235-1-badhri@google.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Nov 30, 2020 at 08:22:34PM -0800, Badhri Jagan Sridharan wrote: > nRetryCount was updated from 3 to 2 between PD2.0 and PD3.0 spec. > nRetryCount in "Table 6-34 Counter parameters" of the PD 2.0 > spec is set to 3, whereas, nRetryCount in "Table 6-59 Counter > parameters" is set to 2. > > Pass down negotiated rev in pd_transmit so that low level chip > drivers can update the retry count accordingly before attempting > packet transmission. > > This helps in passing "TEST.PD.PORT.ALL.02" of the > "Power Delivery Merged" test suite which was initially failing > with "The UUT did not retransmit the message nReryCount times" > > Signed-off-by: Badhri Jagan Sridharan > --- > drivers/usb/typec/tcpm/tcpm.c | 2 +- > include/linux/usb/tcpm.h | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/usb/typec/tcpm/tcpm.c b/drivers/usb/typec/tcpm/tcpm.c > index 3bbc1f10af49..c73bc3a8356a 100644 > --- a/drivers/usb/typec/tcpm/tcpm.c > +++ b/drivers/usb/typec/tcpm/tcpm.c > @@ -667,7 +667,7 @@ static int tcpm_pd_transmit(struct tcpm_port *port, > tcpm_log(port, "PD TX, type: %#x", type); > > reinit_completion(&port->tx_complete); > - ret = port->tcpc->pd_transmit(port->tcpc, type, msg); > + ret = port->tcpc->pd_transmit(port->tcpc, type, msg, port->negotiated_rev); > if (ret < 0) > return ret; > > diff --git a/include/linux/usb/tcpm.h b/include/linux/usb/tcpm.h > index e68aaa12886f..efaedd7e8a18 100644 > --- a/include/linux/usb/tcpm.h > +++ b/include/linux/usb/tcpm.h > @@ -121,7 +121,7 @@ struct tcpc_dev { > enum typec_cc_status cc); > int (*try_role)(struct tcpc_dev *dev, int role); > int (*pd_transmit)(struct tcpc_dev *dev, enum tcpm_transmit_type type, > - const struct pd_message *msg); > + const struct pd_message *msg, unsigned int negotiated_rev); > int (*set_bist_data)(struct tcpc_dev *dev, bool on); > int (*enable_frs)(struct tcpc_dev *dev, bool enable); > void (*frs_sourcing_vbus)(struct tcpc_dev *dev); I think this will break bisectability. You need to change the users of that at in the same commit. thanks, -- heikki