Received: by 2002:ab2:2994:0:b0:1ef:ca3e:3cd5 with SMTP id n20csp663586lqb; Fri, 15 Mar 2024 02:59:03 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXx2UJS8P8xbNtKuN1aWzXj6RLKxfTqBYIs5/u5I6R4hjR1IlBNPN6tBVWv9NMC6VvTxd5FW1lLFliGBIqSQpE7iii7EgzqQAnp0Tt2lg== X-Google-Smtp-Source: AGHT+IF87qC6u1O/wVMwyRayUc+mMy5JwgPkrvsy1F2EYvr53bOcOfZQk5lXWAwyWgtLYu6Z2UCs X-Received: by 2002:a50:cdc1:0:b0:566:ecce:9d3c with SMTP id h1-20020a50cdc1000000b00566ecce9d3cmr2574022edj.26.1710496743214; Fri, 15 Mar 2024 02:59:03 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710496743; cv=pass; d=google.com; s=arc-20160816; b=fSfCAjoLSH3H1uUZFOzSJ73sakNOrDPqNum2rwTyU3jp0nV6druk3TIm8k6AKqFEl8 RfctIFsxpJCWK5iJR2DOB3yl248JcOp2a6jn/98gAXqzD4IjlE0I0XTscvUZeQjkIlAu 37SP61Xp6zw2qm55ikg5JngqXZX4706JqlV7YUso0a7ODGPTe61o9jJ7PkUEQYDMGy3T YpEwR2tXqThPBdeFoCco2Xw35HFiyLovsmbkVS0Fu2Ie1tV/J1u+qsHZ0TAb3fAZnksb 8DCvamXUmPdYepWQPAFGSB8vUbjO+5sOhAnF57CRS6vqlnBPOU61v2JLebnFpCoWOCuL 7tow== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:in-reply-to:subject:cc:to:date:from :dkim-signature; bh=mJ9ykXi0z9SXj6SkdY/qPVUBcaBJeX0WN3yQPjbUa8Y=; fh=/VPkiKdqz+bIqV4bwhj+8IIwRTObpgdr4JxnJnw7ZSE=; b=pQ00HnDB83K1GH2qHGjrRN54eH5sr2L8XcuPmmU6h8kjbUnmqDgO85R0ROzeDGRBuc fsruDmSZLhvHpttpIm/SevrkeCDlWRIhSdI796cbXqVge86whw8udB0ZtziVal0sv7g7 la9RDopnxa3RJVe3uHs2ru7eiperwPN5xYX+ZxKjOAQ2ed/pXIJV1FrTwY+fs2wFtS5+ IEqa9vLBQL5KSFwRiLR8xKjVRAm7xPDMIYEX/mgG2kaAVG9MWNcZHgKbpNuWBE52aDrZ J9ORBT0Mcz8vxh8UGmf0TpGTkKtsCX/R6pPxcyFipZzSuFo0QGhBDFrXK5B4gZNp0BMM 3O0Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=TELJs5vG; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-104233-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-104233-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id h3-20020a056402280300b005688ec3e53dsi1638861ede.342.2024.03.15.02.59.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Mar 2024 02:59:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-104233-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=TELJs5vG; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-104233-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-104233-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id EE1F31F22C85 for ; Fri, 15 Mar 2024 09:59:02 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CE7C818633; Fri, 15 Mar 2024 09:58:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="TELJs5vG" Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.13]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DFD4F18041; Fri, 15 Mar 2024 09:58:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.13 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710496723; cv=none; b=bPvWLk4vxJWhq8c6F7DEa8oUuyrs9hgQBLj2z5a/Yd9vVeBATYSF3tvESIE1ud+hLNnS5s1v7283kACTPHsFdeuQhgTrXLgU5KOHXXI4Sdm7ro//33MAxxkcGcKhYFvXQZ1Qzuqp+ldclbZkpvFIH9Z8ZiKTFn3uPec2l8o4/ME= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710496723; c=relaxed/simple; bh=UorXTGu+AcCu4hDCxmYjcKqMuP8YVTSZD/Jao3gQpVU=; h=From:Date:To:cc:Subject:In-Reply-To:Message-ID:References: MIME-Version:Content-Type; b=Ui8rl2MXGKl4Ok/QrC09yLCuzQZtnv2PF64g/uEOl0Rj7mkyDkbvvoF5rzYEmV4zv4CkGynyybth1qHq+iYfi5T7nUaEZ3IRLZZDEYeym9IrdWo5m1Sz7msEbvxhMXc6s32o1vj/s1PNGbg9q4VyGbPYjqPXKHMuA9X+8bGdgRU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=TELJs5vG; arc=none smtp.client-ip=192.198.163.13 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1710496721; x=1742032721; h=from:date:to:cc:subject:in-reply-to:message-id: references:mime-version; bh=UorXTGu+AcCu4hDCxmYjcKqMuP8YVTSZD/Jao3gQpVU=; b=TELJs5vGA51eQiripYBHr0ScNQm6t47JJPnA4ZLdZsFMcxX0jd0gXi9T AGLDDDVMqpviztoWcO0hQV5T+mo6FUEhIR5zC48u8MA3AM//N438aOmn3 W7ta6XAoLUE5a4/W/at4lQ76ul+hqSdzd/oh8IS4BWXDCaGgnKFryMtcg 3GsuskFxlDrGdPM02NCpyHshZuZJ4ckC7Q9Ka3Za/eX6pKVMKhnYYuLud knmYecjK3hMeWgDZW+R62cHtpVwhjXkUAsFUHHcDZ+XHFOHccw91sk8Of SfIVLrKz0ErI5OohIO86qV82kpkYiesjqm3mYHKKEJIZLTGKhiwOe8BG8 Q==; X-IronPort-AV: E=McAfee;i="6600,9927,11013"; a="8296194" X-IronPort-AV: E=Sophos;i="6.07,128,1708416000"; d="scan'208";a="8296194" Received: from orviesa010.jf.intel.com ([10.64.159.150]) by fmvoesa107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Mar 2024 02:58:40 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,128,1708416000"; d="scan'208";a="12523729" Received: from ijarvine-desk1.ger.corp.intel.com (HELO localhost) ([10.245.247.9]) by orviesa010-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Mar 2024 02:58:38 -0700 From: =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= Date: Fri, 15 Mar 2024 11:58:31 +0200 (EET) To: "Maciej W. Rozycki" cc: Bjorn Helgaas , linux-pci@vger.kernel.org, LKML Subject: Re: [PATCH 1/1] PCI: Use the correct bit in Link Training not active check In-Reply-To: Message-ID: References: <20240301150641.4037-1-ilpo.jarvinen@linux.intel.com> <01666075-504d-a434-d039-2e25db931f23@linux.intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="8323328-1935341792-1710496711=:1018" This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --8323328-1935341792-1710496711=:1018 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE On Thu, 14 Mar 2024, Maciej W. Rozycki wrote: > On Thu, 14 Mar 2024, Ilpo J=C3=A4rvinen wrote: >=20 > > One more point to add here, I started to wonder today why that use_lt= =20 > > parameter is needed at all for pcie_retrain_link()? > >=20 > > Once the Target Speed has been changed to 2.5GT/s which is what the qui= rk=20 > > does before calling retraining, LT too should work "normally" after tha= t. >=20 > We don't know if the link is going to become stable with the TLS update= =20 > to 2.5GT/s and we want to ensure that the link has reached the active=20 > state before claiming victory; LT clear does not mean the link is active,= =20 > it only means what it means, that is that the link isn't being trained at= =20 > the moment. LT clear means retraining has ended which is the condition=20 pcie_retrain_link() should terminate at. It tried and finished retraining= =20 as proven by LT clear. > Also we don't want to reset the TLS to the maximum before the link has= =20 > become active. I'm not suggesting to change the if DLLLA check that is within the quirk=20 so it will remain the same even if pcie_retrain_link() would no longer=20 have the use_lt parameter. If LT clear after retraining does not imply DLLLA set, then this again=20 falls into the quirk territory and IMO the quirk itself should be what=20 makes the additional call to wait for DLLLA, not pcie_retrain_link(). I suspect though that DL clear does imply DLLLA set (after the target=20 speed was lowered) so my expectation is that the extra wait wouldn't be=20 necessary at that point. > Does this answer your question? What I'm trying to achieve is having pcie_retrain_link() focus on=20 retraining and quirk on steps required by the quirk. Currently they're=20 kind of mixed if we assume the assumption that LT clear doesn't imply=20 active link is true. That tells quirk would need additional step,=20 that is, wait for DLLLA after the retraining has completed which is=20 currently hidden into pcie_retrain_link() rather than explicitly=20 called by the quirk. --=20 i. --8323328-1935341792-1710496711=:1018--