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=-2.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no 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 55528C432C0 for ; Thu, 21 Nov 2019 16:47:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 27B8020672 for ; Thu, 21 Nov 2019 16:47:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726293AbfKUQrM (ORCPT ); Thu, 21 Nov 2019 11:47:12 -0500 Received: from foss.arm.com ([217.140.110.172]:59202 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726279AbfKUQrM (ORCPT ); Thu, 21 Nov 2019 11:47:12 -0500 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 D7F8F328; Thu, 21 Nov 2019 08:47:11 -0800 (PST) Received: from e121166-lin.cambridge.arm.com (e121166-lin.cambridge.arm.com [10.1.196.255]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id A30043F52E; Thu, 21 Nov 2019 08:47:10 -0800 (PST) Date: Thu, 21 Nov 2019 16:47:05 +0000 From: Lorenzo Pieralisi To: Kunihiko Hayashi Cc: Andrew Murray , Bjorn Helgaas , linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Masami Hiramatsu , Jassi Brar , Kishon Vijay Abraham I Subject: Re: [PATCH 2/2] PCI: uniphier: Add checking whether PERST# is deasserted Message-ID: <20191121164705.GA14229@e121166-lin.cambridge.arm.com> References: <20191107205239.65C1.4A936039@socionext.com> <20191107124617.GA43905@e119886-lin.cambridge.arm.com> <20191108163026.0DFB.4A936039@socionext.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191108163026.0DFB.4A936039@socionext.com> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org On Fri, Nov 08, 2019 at 04:30:27PM +0900, Kunihiko Hayashi wrote: > > However, If I understand correctly, doesn't your solution only work some > > of the time? What happens if you boot both machines at the same time, > > and PERST# isn't asserted prior to the kernel booting? > > I think it contains an annoying problem. > > If PERST# isn't toggled prior to the kernel booting, PERST# remains asserted > and the RC driver can't access PCI bus. > > As a result, this patch works and deasserts PERST# (and EP configuration will > be lost). So boot sequence needs to include deasserting PERST#. I am sorry but I have lost you. Can you explain to us why checking that PERST# is deasserted guarantees you that: - The EP has bootstrapped - It is safe not to toggle it again (and also skip uniphier_pcie_ltssm_enable()) Please provide details of the HW configuration so that we understand what's actually supposed to happen and why this patch fixes the issue you are facing. Thanks, Lorenzo