Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp981561rwd; Thu, 8 Jun 2023 10:14:51 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5kaa1BNgXoJr8itgWkmGmG+wuc91IDNvfMWoqdBe7nC3bBbFY+LPc8cn+tfzEL9FwPkTqJ X-Received: by 2002:a05:6a20:3d92:b0:118:b2e1:9adb with SMTP id s18-20020a056a203d9200b00118b2e19adbmr3443828pzi.61.1686244491232; Thu, 08 Jun 2023 10:14:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686244491; cv=none; d=google.com; s=arc-20160816; b=hDyug6CqTqGy7R0WA6bCkiBALJAs+qyTRNqTXc2j7dICT+guP6tZHPo/FmGaitYEgy ln8M6aERJ85g5SF02Ko8PJvvTzlaZrdIYv2djzDxTXnkRMr7CZ+YXVPZEocLkyjFwLvc +CIzqBk1Gs3K0P66+Lb2BSM3suTNWeP41W3STXXYF8VUSDGe0gb+TTASZsddxHhdsKrD sc9l9HwfdmWsQXdvxQPztO9WLTbjvRFS8nGc6Dm5jBDJ7vwI1h6/APVNDcnqysDFnMrn /B28COYVroSUu/pI8a4zOWz37lxwX/7nEfFHFwl/r0jbNIiGMbbbTH6rnMbXfB2o5rX8 aZBg== 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 :message-id:subject:cc:to:from:date:dkim-signature; bh=rDdfOUJ9pSrhyYibJqLF2MJBBPZiDQzdJxXcN6bLznk=; b=brLoY95mKVQ/TNgLdtZ1cGpIdfQHjBiwUMQeaKjwTogPRQ2arsVpPHDQYKWFv74BHp LooE9F/J/Loj00KVIW9SFYBszOjScrG+LFUg96FwTQkj+3w6sFpWt2iaQ9lQ9sc5HdCh glIZw6CGernZ5gReS+RUy5Zk0y9Xh9fRhqWYLlcTXShaxnnHKYbeKg+Q2m1bdextT1XD kaYwrrFbo9EYnFUML034R6BUISt3SC/dnIE6gF4ckZWmW08tyJsz4kx78rhzD+V4Ui6G 1HBQ+fIS5tJ4Ms/gkn/hJeTinsRtnUpQ7aWYHZ3/IBwCqkzmXOall0J4trUiG/qyrNdJ TD2g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=FpvdDBI5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q2-20020a632a02000000b0054405fa9251si1229881pgq.896.2023.06.08.10.14.38; Thu, 08 Jun 2023 10:14:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=FpvdDBI5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235886AbjFHQev (ORCPT + 99 others); Thu, 8 Jun 2023 12:34:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42806 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233006AbjFHQeh (ORCPT ); Thu, 8 Jun 2023 12:34:37 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0D1DE3596; Thu, 8 Jun 2023 09:33:49 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id E421364F0E; Thu, 8 Jun 2023 16:33:48 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id F26A4C433EF; Thu, 8 Jun 2023 16:33:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1686242028; bh=kp2D3wniyS6MSwZP3nNGR6ZTZAnV62gf4ioxemSH1c4=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=FpvdDBI5enmuyxzxLPXViQvT79KftAY2Lyu6j8y++ezQRGK/fAUHsbtVX1IeT3wZM gaF4yTxCo0SXO9gZNpDDnjmAjErFhqTQnsC0frEjN8OR62fGfzuV8zndhkP8Qv9xHn 0VC90MJOi1SUPsd5pgxbwd9HmT9jRVewqRmAL1+X9cP9C2FI1ybKIe/cFFTFJQlp0q JOArXv1D8dyqtUoqB+E9iY7wMYdj7aASW1GY0akJohmx2NXilplhXj2KYld5T5Kqa3 9DJPz9w2HZauPi6mSJBcMJ+c+fmtUbRjih4gTHyeSpZpwPFMoecXxKgACGxO4CD++Y YZAw/EQ2kpRyw== Date: Thu, 8 Jun 2023 11:33:46 -0500 From: Bjorn Helgaas To: Vidya Sagar Cc: lpieralisi@kernel.org, kw@linux.com, robh@kernel.org, bhelgaas@google.com, thierry.reding@gmail.com, jonathanh@nvidia.com, Sergey.Semin@baikalelectronics.ru, linux-pci@vger.kernel.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org, kthota@nvidia.com, mmaddireddy@nvidia.com, sagar.tv@gmail.com Subject: Re: [PATCH V1] Revert "PCI: tegra194: Enable support for 256 Byte payload" Message-ID: <20230608163346.GA1204586@bhelgaas> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230608093652.1409485-1-vidyas@nvidia.com> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jun 08, 2023 at 03:06:52PM +0530, Vidya Sagar wrote: > This reverts commit 4fb8e46c1bc4 ("PCI: tegra194: Enable > support for 256 Byte payload") > > Consider a PCIe hierarchy with a PCIe switch and a device connected > downstream of the switch that has support for MPS which is the minimum > in the hierarchy, and root port programmed with an MPS in its DevCtl > register that is greater than the minimum. In this scenario, the default > bus configuration of the kernel i.e. "PCIE_BUS_DEFAULT" doesn't > configure the MPS settings in the hierarchy correctly resulting in the > device with support for minimum MPS in the hierarchy receiving the TLPs > of size more than that. Although this can be addresed by appending > "pci=pcie_bus_safe" to the kernel command line, it doesn't seem to be a > good idea to always have this commandline argument even for the basic > functionality to work. > Reverting commit 4fb8e46c1bc4 ("PCI: tegra194: Enable support for 256 > Byte payload") avoids this requirement and ensures that the basic > functionality of the devices irrespective of the hierarchy and the MPS of > the devices in the hierarchy. > To reap the benefits of having support for higher MPS, optionally, one can > always append the kernel command line with "pci=pcie_bus_perf". Please add blank lines between paragraphs and wrap to fill 75 columns. Also add a period at the end of the very first sentence. s/addresed/addressed/ I guess that without 4fb8e46c1bc4, Linux configured everything with 128 byte MPS, and 4fb8e46c1bc4 was intended as an optimization to allow 256 byte MPS. If the Root Port advertises Max_Payload_Size Supported as 256 bytes in DevCap, and the PCI core doesn't configure MPS=256 when possible, I'd argue that should be fixed in the PCI core without a driver change like this. Bjorn