Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3105876pxj; Mon, 7 Jun 2021 02:22:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxxkASXLGKOCqsFuU/NRXcwpVjZq0aNOpF7Im4GHX1thvnG1CKScPj8jYOgZuaMfpcZK8Gm X-Received: by 2002:a17:906:a0a:: with SMTP id w10mr17170383ejf.416.1623057733259; Mon, 07 Jun 2021 02:22:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623057733; cv=none; d=google.com; s=arc-20160816; b=ooT7BUAHx3otrLVtrv64Ga+CjA8zXTcEjFb0NMkatEk5wEXwexMZnLzRVyXMoeK6EB kmV6+wP2nWnTDfmydAHn151LwYdSiCVG2Ml7LyZ6Cx/cZ0bxlpdorSTijRrrfR3fg6lS pVYdCYbYVA2pKeqtNnlxplkb7/aEqJ5NpolSldJQqddEwnDMnWhzhcYWYnIEUEH2u/XC +v/FFdpMkNKiyeevmTEIHvAbaagZ5xB4QpG+EgE9bqWEGLyq3xuTPnEqRqtfAeUWL0bc NITXy9FzhtS2KutOE3zczti4QxtreJZD/mUk777aAFDK2AIVWpCog/dS3V8wyoSZpdar 0N9w== 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=Q3O/1BtD5oP0A3eHWXfzEDehrTUe8xzz3YFc0vhr+Gs=; b=fLO11tWKvTXrpJ+49UYECWMbpzyH+cUumof+iwe7oy1owJf20gBsdmJ0Hn2xpkpzEh vKEc9xFrt1omZRKroGl/IZIn3jpKCxs+8REwysYdZTLKXl4h5jKqQZK9nOZL8N638eY6 kLV/yRo3Hfd/wd45GCyyqQXsS3jb9syYYUjD6J0SsXnDpQB5U59xIpD4vXg33e5wViFW 9Cyzj5cBLCX5lc/3gRSG52Jn8iIT751GgQUA1VfGh1XNLy/4MwXw0wA7U7Wn4GKqS6JI 4s3FoHviBJCGaQGkmdnszV02qYx4YLroyennHT0i0JTKg3kVcvoUXXmrJVUi+UD0Guri WNXw== 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 ch5si279373edb.455.2021.06.07.02.21.50; Mon, 07 Jun 2021 02:22:13 -0700 (PDT) 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 S230247AbhFGJWM (ORCPT + 99 others); Mon, 7 Jun 2021 05:22:12 -0400 Received: from mga03.intel.com ([134.134.136.65]:36156 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229966AbhFGJWM (ORCPT ); Mon, 7 Jun 2021 05:22:12 -0400 IronPort-SDR: oqGam3Kis1j8g0gcDTRMb6xwoTFuVz771MdcQz+mGneCsCdCyLw5a3i1tpTfDuMq/GsZMrSUjS Rv6nm71e3Hdw== X-IronPort-AV: E=McAfee;i="6200,9189,10007"; a="204610344" X-IronPort-AV: E=Sophos;i="5.83,254,1616482800"; d="scan'208";a="204610344" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Jun 2021 02:20:21 -0700 IronPort-SDR: z4C20yGvCTYUWBw0FSST4DuxuboqnJjtaHIEIzZAUosGdxQVwZg1AqwQuW1gWV8yFsxfTxYNJQ 7NiU36d6CZyQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.83,254,1616482800"; d="scan'208";a="551816159" Received: from kuha.fi.intel.com ([10.237.72.162]) by fmsmga001.fm.intel.com with SMTP; 07 Jun 2021 02:20:18 -0700 Received: by kuha.fi.intel.com (sSMTP sendmail emulation); Mon, 07 Jun 2021 12:20:17 +0300 Date: Mon, 7 Jun 2021 12:20:17 +0300 From: Heikki Krogerus To: Kyle Tso Cc: linux@roeck-us.net, gregkh@linuxfoundation.org, badhri@google.com, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] usb: typec: tcpm: Do not finish VDM AMS for retrying Responses Message-ID: References: <20210606081452.764032-1-kyletso@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210606081452.764032-1-kyletso@google.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Jun 06, 2021 at 04:14:52PM +0800, Kyle Tso wrote: > If the VDM responses couldn't be sent successfully, it doesn't need to > finish the AMS until the retry count reaches the limit. > > Fixes: 0908c5aca31e ("usb: typec: tcpm: AMS and Collision Avoidance") > Signed-off-by: Kyle Tso Acked-by: Heikki Krogerus > --- > drivers/usb/typec/tcpm/tcpm.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/usb/typec/tcpm/tcpm.c b/drivers/usb/typec/tcpm/tcpm.c > index 0db685d5d9c0..08fabe1fc31d 100644 > --- a/drivers/usb/typec/tcpm/tcpm.c > +++ b/drivers/usb/typec/tcpm/tcpm.c > @@ -1965,6 +1965,9 @@ static void vdm_run_state_machine(struct tcpm_port *port) > tcpm_log(port, "VDM Tx error, retry"); > port->vdm_retries++; > port->vdm_state = VDM_STATE_READY; > + if (PD_VDO_SVDM(vdo_hdr) && PD_VDO_CMDT(vdo_hdr) == CMDT_INIT) > + tcpm_ams_finish(port); > + } else { > tcpm_ams_finish(port); > } > break; > -- > 2.32.0.rc1.229.g3e70b5a671-goog -- heikki