From patchwork Mon Jan 10 01:50:17 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Marek_Beh=C3=BAn?= X-Patchwork-Id: 12708125 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0F1FFC433F5 for ; Mon, 10 Jan 2022 02:05:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=mNUU9sXpcSN8pYUqQadjL1yhoAFvqOT4TgkYITv5hkU=; b=V8q9qjSV4Vxpjn FkYmdTXHCEa50y9HGRufWWyDtTo4NzyQLT87q9iNSJ2sLC/YqPgMpnJGOOAKclYODvfQsaAt7D6tX sjm5KMtK3YEhuwD74jdDzhG8kfFa1wFTggI0f6Y4GER7Ri0UXKE3nNTr7+lZFWiWrOZ2vEaebyu3b QLs8EE2KmfrDGeN+aXEm9/rfpgVL+fVsqit2CPA/Auk55mDlGrMXly8W+z0nxStwSxP1NWgQFoKwV 7JxlnN58c6cFIFpeJ6UH46HGEZDJDgXFZljARMFW3fUGkL3YjDOwkh7ssN1Znui1Mazf/x4yOFP/O QvlwjFLYLeRXRmKNtAKA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1n6k2Q-008spi-NC; Mon, 10 Jan 2022 02:03:58 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1n6jq2-008lsG-2M for linux-arm-kernel@lists.infradead.org; Mon, 10 Jan 2022 01:51:11 +0000 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 9C10160EE9; Mon, 10 Jan 2022 01:51:09 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4D275C36AEF; Mon, 10 Jan 2022 01:51:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1641779468; bh=KV7Ev/+vKumsneQrWXEMHP1+QXgo9I55XQRdzbJR9Gk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tDGmslbciBZK6YBatPSCm3gqZ8oIsGRAJEJ5UULGjU3QWMMzKwuxck6B1FvIw8Of5 wHnrYdEh27ejd71+mbElkc4uUfixv2n5wPzQe3M5av2SnpqsHMGTlSIMj6UALbS9Sb UnSCyn++6a8dh+5zLjPKw/eLxQWkqgGDRsUB4wktpA1DTQhKzZtLAYP0X+7hRsqrUT ajq616PqL/2eKD3axZKupsT5XHgJ6bPOJCb39Bm+1mAKl1mOxvGHrLkWtox8ZpwvYK l0OeASi+WSbrYHcUgjSehS9ZbfbAeCQ7z3Ut7MbQ68jv6S6o1WdB/+BrNtsWq2R2y1 ynJ2jXJDWElXw== From: =?utf-8?q?Marek_Beh=C3=BAn?= To: Marc Zyngier , Lorenzo Pieralisi , Bjorn Helgaas Cc: pali@kernel.org, linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, =?utf-8?q?Marek_Beh=C3=BAn?= Subject: [PATCH v2 22/23] PCI: aardvark: Update comment about link going down after link-up Date: Mon, 10 Jan 2022 02:50:17 +0100 Message-Id: <20220110015018.26359-23-kabel@kernel.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220110015018.26359-1-kabel@kernel.org> References: <20220110015018.26359-1-kabel@kernel.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220109_175110_173877_9B848645 X-CRM114-Status: GOOD ( 14.70 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Update the comment about what happens when link goes down after we have checked for link-up. If a PIO request is done while link-down, we have a serious problem. Signed-off-by: Marek BehĂșn --- drivers/pci/controller/pci-aardvark.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/pci/controller/pci-aardvark.c b/drivers/pci/controller/pci-aardvark.c index 360e2e3b3aa6..2c5cc929b94f 100644 --- a/drivers/pci/controller/pci-aardvark.c +++ b/drivers/pci/controller/pci-aardvark.c @@ -1007,8 +1007,12 @@ static bool advk_pcie_valid_device(struct advk_pcie *pcie, struct pci_bus *bus, return false; /* - * If the link goes down after we check for link-up, nothing bad - * happens but the config access times out. + * If the link goes down after we check for link-up, we have a problem: + * if a PIO request is executed while link-down, the whole controller + * gets stuck in a non-functional state, and even after link comes up + * again, PIO requests won't work anymore, and a reset of the whole PCIe + * controller is needed. Therefore we need to prevent sending PIO + * requests while the link is down. */ if (!pci_is_root_bus(bus) && !advk_pcie_link_up(pcie)) return false;