Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp1068363imm; Thu, 31 May 2018 14:45:57 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKi9xmznyg8BIx3RGRmtrXVWFx0rnmwpfU9CyQPpYuex4zEtlhKqoK3KGzMmz7GEoo1mTcl X-Received: by 2002:a65:5807:: with SMTP id g7-v6mr6701836pgr.409.1527803157395; Thu, 31 May 2018 14:45:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527803157; cv=none; d=google.com; s=arc-20160816; b=IvB63YjLNGVJbdN+4Pr39tCFYO2O8ucxHe7UuSKceuabV+rHWpVlLiRHrYrjWqS88z w+nt1ebK9accmo5jMxOPxY+WJWo9ikmk8Owh74CJwpAy21HBiZzHicMeBp7Sxeem/JFQ ySocQBhKng77k3Na6EE3ys47dJNwiYUP0PhoFCCbiZ5kGanXzUelTsE6XlJdCRxZntJF 94mQ59RSW+gwjeJkiiMopzznKM3ss2t/dJGguw+2cW/9dMfLYdDjY29dDUqOmCt5hjmM l16+fc+Ac6QKnR1235WfvrwSl6nQuKLMJCdC1cd0QvD5LJufqNGlm3C6CJVL76mDtpDk f3uA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=ZW8+gLJZcTfTtqXNFzyT5BTLHHkQAES31LzKzsQ68Yw=; b=dm5WoHURR74vKHuSdrM3iKg+ciGFUCuAXAnv5mUdDP7glXvI4avipjyqWk5KOupC8d 4JpOetha4++mb5FnWFw8wF0cL7figqCpOhQK1xt8wz3LPcw0+D9RzbTdNs/NZQJbii3v u/hwt3gVG1IV3nm4syUM2XmDIQ+0y8uuJGtsX7IPCyxMdpQzgui3dJSaNWIKy2X8uL7n mZTFy8oa+nyxCNjIdrR9WJ0Fwv5ZXdqq/OaclcPEdg9f7YZhe7ZJMKWhGP3X5bjKFvr3 zY9th+zIbmvgWVeSuw6fbw4HItchLv3tdBCzwI9w490iQG/9MlORIR0CK2jAyHdUOEJX pjpg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=b1+daKZ5; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r3-v6si40036807pli.324.2018.05.31.14.45.43; Thu, 31 May 2018 14:45:57 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=b1+daKZ5; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750816AbeEaVoV (ORCPT + 99 others); Thu, 31 May 2018 17:44:21 -0400 Received: from mail-ot0-f193.google.com ([74.125.82.193]:42777 "EHLO mail-ot0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750714AbeEaVoT (ORCPT ); Thu, 31 May 2018 17:44:19 -0400 Received: by mail-ot0-f193.google.com with SMTP id l13-v6so27009281otk.9; Thu, 31 May 2018 14:44:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=ZW8+gLJZcTfTtqXNFzyT5BTLHHkQAES31LzKzsQ68Yw=; b=b1+daKZ5q9TGNI9pDepl18DEZis132pchDXHZD/NewuvKDkN93CQPUBNR8XrnSvMgN JwWuyybYg6qJtMoU1QVGBzJBK/X68nF4dGgqOk+02xKkFM3WLsVE8DVf6GaYJb0XQyoD 2ZTbAveH2kJZ/wcNJCaKMENAGDuzr2bpRSuznhrqc8JmmTJ+vbvU8bbsSd3W6H98RTGS Hki5FhdKi0HDnJXyKBp2xxDIrrO0rd0Sb+8VsTfJNfxiJO9gHFGdRfYdSEXSXyWDM6xZ bqsXvJiPd6JX8+ELlLC3S7RyFEAn4MGEK5Gt1RD2av/R5W+6KJ0YT+WgbWOooMNZg36g 7Jow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=ZW8+gLJZcTfTtqXNFzyT5BTLHHkQAES31LzKzsQ68Yw=; b=XdASTzMviqVmaz9O8RbjHcVUPP75bxTHxixoLWVIp4l57SP8tFoO+du3WvEqyNWmLK sTX4o7wfvgH2nXV0/SG7sBkKy2J6I5fOBXjrhu2kDCrBj4vlXqAohZhbNVfgM95yM20S rJWn6U0NEAwjfw8lQ9C4cOlo2uMNaPL44pYjYH9OU+Pd8jjXpYaOeVrUk1Idgm19r1Og 5ysFU3eNqpbVa0/It/lIqENSPiUq8PpvMMVN694aljVj9i0ClzN4t6d2g0e1fcnLuitg YLUI03EtMkryDWxRVGHkizMhYR9QmaKfmkaCqh4LHjtwU+1jS/SNUhgCn2dNsiiPSUCR p5+Q== X-Gm-Message-State: APt69E0HzwiqquPlYqxTX3rnWUGyeaIxAilk2jgF8rUk1TnAE0AjVgRp qQMX54JJPtzmIVYFoUJhPN/F/qV9O9g= X-Received: by 2002:a9d:4618:: with SMTP id y24-v6mr5343192ote.333.1527803058233; Thu, 31 May 2018 14:44:18 -0700 (PDT) Received: from nuclearis2_1.gtech (c-98-201-114-184.hsd1.tx.comcast.net. [98.201.114.184]) by smtp.gmail.com with ESMTPSA id b38-v6sm1942390otd.61.2018.05.31.14.44.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 31 May 2018 14:44:17 -0700 (PDT) Subject: Re: [PATCH] PCI: Check for PCIe downtraining conditions To: Sinan Kaya , bhelgaas@google.com Cc: alex_gagniuc@dellteam.com, austin_bolen@dell.com, shyam_iyer@dell.com, keith.busch@intel.com, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org References: <20180531150535.9684-1-mr.nuke.me@gmail.com> From: "Alex G." Message-ID: <3e0ddec1-649b-3e97-65e5-073dd9d45a1c@gmail.com> Date: Thu, 31 May 2018 16:44:16 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05/31/2018 10:30 AM, Sinan Kaya wrote: > On 5/31/2018 11:05 AM, Alexandru Gagniuc wrote: >> + if (dev_cur_speed < max_link_speed) >> + pci_warn(dev, "PCIe downtrain: link speed is %s (%s capable)", >> + pcie_bus_speed_name(dev_cur_speed), >> + pcie_bus_speed_name(max_link_speed)); >> + > > Also this isn't quite correct. Target link speed is what the device tries to > train. A device can try to train to much lower speed than the maximum on purpose. > > It makes sense to print this if the speed that platform wants via target link > speed is different from what is actually established though. After seeing Gen 3 devices that train above the speed in the target link speed field, I talked to one the spec writers today. There is some ambiguity with the target link speed field. In PCIe 4.0 they are clarifying that to state that this field is "permitted to have no effect". Alex