Received: by 2002:a05:6a10:8a4d:0:0:0:0 with SMTP id dn13csp834187pxb; Fri, 13 Aug 2021 07:21:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwFPfDme2+By28TeT9TH4iwafBE2l8M53oWPJcVr3upQI0uPvylYLNrm09g1gD+gPSjtNeA X-Received: by 2002:a05:6602:48c:: with SMTP id y12mr2244517iov.14.1628864515871; Fri, 13 Aug 2021 07:21:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628864515; cv=none; d=google.com; s=arc-20160816; b=uZXpCcY3jySUicPBHqyt3VW2CjUTwPdZ5R5j2RoxmLx25imBrU7/zxF1xce9fx0ePC wYzI9KIGM4GpFOSSjASLbNnUFZw5NAyqnsBWTBOJUrA7VKFMGvKCTsc76ArnUZGaShzW LTzEixLS7mKEyg5gKixmfZKLe64H/UC5R66GNx2aGO00fK36I6Fne5L5jp7hW3TBGqLy saHXpWDxn74O5nnkcTWr0hB8sAMGtuzlSQwEpdQlPgrog46caV4YT/ogwVU1D11oKm9n VBqGcaJ/HZC01yVxV/nKSlTT8DBeiiGkEFAYrrjwr1VQMcrNiRHz1Cup58KInnk1lbkJ +Q2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=kQOIn/we86ZtptTd/myCh7j274I/OU1y5eAdeuqfkpI=; b=ENsefcN5A8iieBdkgIfBZzr8RbhFwJr9nMtWYRnB5FfgyMpNLCPZ4RE5RzgIRDq2VN 9t/JP9ZVG7P0bgIPwBcmJyvDuITTby5utBFEDEnzzCw24IP1mn+EeBqy9iNRb++joBAX W6Y0N1dLylnlDKfpZ8FdJd9bZwkMyfqdWjuuzgwoa9+t52kisQGb2kGfjWSdkHeTalEO 0MJbHSF27THh1QLSF79Usxu4tm7x0QARPYJds96v3aoBEy3aAfqeotIE5RfVvaV0f5cr GiUh1o/CvXuA2/Qyp7fvkNxqT7AmDH0cksy8/eZD014utLqzEsLfOGP2LTKh8qCfsLa3 c+UA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="Y77V+g/Q"; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p20si1619673ioo.40.2021.08.13.07.21.45; Fri, 13 Aug 2021 07:21:55 -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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="Y77V+g/Q"; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240685AbhHMNqe (ORCPT + 99 others); Fri, 13 Aug 2021 09:46:34 -0400 Received: from mail.kernel.org ([198.145.29.99]:46444 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240654AbhHMNqY (ORCPT ); Fri, 13 Aug 2021 09:46:24 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 4821761139; Fri, 13 Aug 2021 13:45:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1628862357; bh=EeUi56ckdIOJ1FigLpBTvp288V0VDz6TPWb/K7uw19Q=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=Y77V+g/QCxA9W5CuhWYiq/iyFiDxYmMWQIhl/IrFE3E+ORsAxs/FOU4MYxXc5TpAx +2MFZrryhLSxP993y1eMAewgHk/7Sycyiiq7VUf8u2rRfVbiSu/Ehd8C4ZpwWW+lvG s3fnxEGwC1UqUK70fENXPwjAjbCi3ahnTbJNGRBQopHTW/CJXuk476mD9+LC6BHRjy Rq/N3zVg/tMcTJhjJpkpiENnmFTMYMhJVanh1ZPEXF/TBGfjSDwPkuK+jwUSNR8vsc htCi2kP8hb2+Hpt63BWA54Y5tJrix+Aqb3dUq1iqs6XVeIODEEHdETm6hYTTxO7/PJ Ocuz90Lnxx7dg== Received: by mail-ej1-f52.google.com with SMTP id u3so18442164ejz.1; Fri, 13 Aug 2021 06:45:57 -0700 (PDT) X-Gm-Message-State: AOAM531YIrWWGYDk6h3N8eayQvjxsQBJU+//EUZgt7ahAlgBPBIf0oyh Qm5zJA/DSiFNHeGCPPouJEfOqiFZNRssSRYj2g== X-Received: by 2002:a17:906:8cd:: with SMTP id o13mr2516158eje.341.1628862355806; Fri, 13 Aug 2021 06:45:55 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Rob Herring Date: Fri, 13 Aug 2021 08:45:43 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] PCIe: limit Max Read Request Size on i.MX to 512 bytes To: =?UTF-8?Q?Krzysztof_Ha=C5=82asa?= Cc: Bjorn Helgaas , PCI , Artem Lapkin , Neil Armstrong , Huacai Chen , Lorenzo Pieralisi , =?UTF-8?Q?Krzysztof_Wilczy=C5=84ski?= , Richard Zhu , Lucas Stach , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Aug 13, 2021 at 3:52 AM Krzysztof Ha=C5=82asa wro= te: > > DWC PCIe controller imposes limits on the Read Request Size that it can > handle. For i.MX6 family it's fixed at 512 bytes by default. > > If a memory read larger than the limit is requested, the CPU responds > with Completer Abort (CA) (on i.MX6 Unsupported Request (UR) is returned > instead due to a design error). > > The i.MX6 documentation states that the limit can be changed by writing > to the PCIE_PL_MRCCR0 register, however there is a fixed (and > undocumented) maximum (CX_REMOTE_RD_REQ_SIZE constant). Tests indicate > that values larger than 512 bytes don't work, though. > > This patch makes the RTL8111 work on i.MX6. > > Signed-off-by: Krzysztof Ha=C5=82asa > > diff --git a/drivers/pci/Kconfig b/drivers/pci/Kconfig > index 0c473d75e625..a11ec93a8cd0 100644 > --- a/drivers/pci/Kconfig > +++ b/drivers/pci/Kconfig > @@ -34,6 +34,9 @@ config PCI_DOMAINS_GENERIC > config PCI_SYSCALL > bool > > +config NEED_PCIE_MAX_MRRS We don't need a config option for this. It's not much code and it will effectively always be enabled with multi-platform kernels. Rob