From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.5 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0A6AEC4320A for ; Thu, 2 Sep 2021 13:07:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D8D01610CE for ; Thu, 2 Sep 2021 13:07:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344481AbhIBNIT (ORCPT ); Thu, 2 Sep 2021 09:08:19 -0400 Received: from foss.arm.com ([217.140.110.172]:49222 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234054AbhIBNIS (ORCPT ); Thu, 2 Sep 2021 09:08:18 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 6FBE51FB; Thu, 2 Sep 2021 06:07:19 -0700 (PDT) Received: from [10.57.15.112] (unknown [10.57.15.112]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 41B0D3F5A1; Thu, 2 Sep 2021 06:07:17 -0700 (PDT) Subject: Re: [PATCH v4] iommu/of: Fix pci_request_acs() before enumerating PCI devices To: Anders Roxell Cc: Marek Szyprowski , Wang Xingang , Rob Herring , Will Deacon , joro@8bytes.org, helgaas@kernel.org, Rob Herring , Greg Kroah-Hartman , iommu@lists.linux-foundation.org, Linux Kernel Mailing List , linux-pci@vger.kernel.org, xieyingtai@huawei.com, "linux-arm-kernel@lists.infradead.org" , Linux-Next Mailing List References: <1621566204-37456-1-git-send-email-wangxingang5@huawei.com> <01314d70-41e6-70f9-e496-84091948701a@samsung.com> From: Robin Murphy Message-ID: <25b0b214-b9b4-4066-3912-a5bcb054dc0d@arm.com> Date: Thu, 2 Sep 2021 14:07:12 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org On 2021-09-02 13:51, Anders Roxell wrote: > On Wed, 1 Sept 2021 at 11:58, Robin Murphy wrote: >> >> On 2021-09-01 09:59, Marek Szyprowski wrote: >>> On 21.05.2021 05:03, Wang Xingang wrote: >>>> From: Xingang Wang >>>> >>>> When booting with devicetree, the pci_request_acs() is called after the >>>> enumeration and initialization of PCI devices, thus the ACS is not >>>> enabled. And ACS should be enabled when IOMMU is detected for the >>>> PCI host bridge, so add check for IOMMU before probe of PCI host and call >>>> pci_request_acs() to make sure ACS will be enabled when enumerating PCI >>>> devices. >>>> >>>> Fixes: 6bf6c24720d33 ("iommu/of: Request ACS from the PCI core when >>>> configuring IOMMU linkage") >>>> Signed-off-by: Xingang Wang >>> >>> This patch landed in linux-next as commit 57a4ab1584e6 ("iommu/of: Fix >>> pci_request_acs() before enumerating PCI devices"). Sadly it breaks PCI >>> operation on ARM Juno R1 board (arch/arm64/boot/dts/arm/juno-r1.dts). It > > We've seen this on ARM Juno R2 boards too in the Linaro testfarm. > > The problem is that the device can't get the "SATA link up" while booting. > > see https://lkft.validation.linaro.org/scheduler/job/3416767#L577 Hmm, what's odd there is that you don't seem to be even detecting any of the endpoints there. Notably, the switch (which both the slots and the on-board endpoints are behind) *does* support ACS even though the Root Complex doesn't, so I wonder if it's getting enabled there and causing it to forward TLPs with ACS bits set which the RC doesn't like? I'm far from a PCI expert, but I might try running this patch on my board to see if anything else stands out. Robin. > When reverting this patch we are able to see the "SATA link up". > > Cheers, > Anders >