From patchwork Mon Nov 27 06:20:27 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sinan Kaya X-Patchwork-Id: 10075853 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 2EDF5602BD for ; Mon, 27 Nov 2017 06:31:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1E16A2894B for ; Mon, 27 Nov 2017 06:31:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 130832895D; Mon, 27 Nov 2017 06:31:42 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 94DD52894B for ; Mon, 27 Nov 2017 06:31:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=24ESJ081leQH0/OwlJSFEtdCwkawZUifJY1gMhwLM4c=; b=A/1EPCN3O/Lg8jUyRFu0VmChwO pawbuEdXzJbphmV/7VL9V2EUdOL4bxztGh5Dn+G3h+uNq4bEfhBjwGMVaCo5HntfJBEhJ52SyAJqX s4dhHe+vAkWn/psVqq/bhLzsFavNpN/sbFyU5tch9tFKCSkSS15dNn+ZNZDKVx3BawD8BUQtd2Xff j6qLElAe5p/q38GTY3oOWVWGAZnHpqjxgD9bdZvXT2ygmQfY0PjMLP+mF7Ot/Py2Z3cHEnw5V+8ml 4CMql2ac3QBMoahN6AeHXcSD/BFwsli0UWj5U8SuMg9s7vhkXiCNGC/YH8Bvh9ZhnTLOejoRsD6jV oNGWmy+g==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1eJCx8-0001kT-Ie; Mon, 27 Nov 2017 06:31:38 +0000 Received: from smtp.codeaurora.org ([198.145.29.96]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1eJCn5-00044D-Tm for linux-arm-kernel@lists.infradead.org; Mon, 27 Nov 2017 06:21:21 +0000 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 4AB4B69AFB; Mon, 27 Nov 2017 06:20:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1511763643; bh=OFTEhXMhOn+ouQotubtUZQFwW9haejBp2Gs5CO3q4VE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NLVkNJkb9v8aHpZxSpwqI4ykrdJFklwd1ajkExZKPPalr8JJ9QT5KlZzPOUNHhlCr 3k7LZ8CZxIXLUhwXiF7sm42wcS1wzwjJ9sfFHggm92w/Dz/8BJAt99ezDbFnL5Gn9N p4izJRoXYMOBqIgi6M5hn6M0a4droag3+fOPkDEk= Received: from drakthul.qualcomm.com (global_nat1_iad_fw.qualcomm.com [129.46.232.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: okaya@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id F010E69B3A; Mon, 27 Nov 2017 06:20:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1511763642; bh=OFTEhXMhOn+ouQotubtUZQFwW9haejBp2Gs5CO3q4VE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QBGP6SLxz5ofRT2B6jM0QxKTlUBm7wXM0PimNRxh1Nit3G3r4+eXXUNPD+pMuPzrY ZAJ4371LF8YqBQ8M5FU27NTuriUHCLgec8WvXtpefgQJcVEmeNyy7804uWdV4YSeGG +vc7+rGa+eklNRPAKhdSJ68/t/VaQCxiDAm/nUik= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org F010E69B3A Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=okaya@codeaurora.org From: Sinan Kaya To: linux-pci@vger.kernel.org, timur@codeaurora.org Subject: [PATCH V2 6/7] PCI: add device wait after slot and bus reset Date: Mon, 27 Nov 2017 01:20:27 -0500 Message-Id: <1511763628-11856-7-git-send-email-okaya@codeaurora.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1511763628-11856-1-git-send-email-okaya@codeaurora.org> References: <1511763628-11856-1-git-send-email-okaya@codeaurora.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20171126_222117_061105_52351D7D X-CRM114-Status: UNSURE ( 9.44 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Sinan Kaya , linux-arm-msm@vger.kernel.org, Bjorn Helgaas , open list , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Rev 3.1 Sec 2.3.1 Request Handling Rules indicates that a device can issue CRS following secondary bus reset. Handle device presence gracefully. Signed-off-by: Sinan Kaya Reviewed-by: Christoph Hellwig --- drivers/pci/pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index 0a9a696..8472c24 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c @@ -4035,7 +4035,7 @@ int pci_reset_bridge_secondary_bus(struct pci_dev *dev) { pcibios_reset_secondary_bus(dev); - return 0; + return pci_dev_wait(dev, "bus reset", PCIE_RESET_READY_POLL_MS); } EXPORT_SYMBOL_GPL(pci_reset_bridge_secondary_bus);