Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp1890183imm; Tue, 22 May 2018 10:59:11 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpT2ATzjiwzhj8kTAO8w+3nI0b9PYEL3Ey+p6fN+9RK5KZRy6WI0LwfO60QrynobkL78Kdj X-Received: by 2002:a62:9d5a:: with SMTP id i87-v6mr25470278pfd.190.1527011951580; Tue, 22 May 2018 10:59:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527011951; cv=none; d=google.com; s=arc-20160816; b=By9JucDCapwraj2gRloEGPp5MPumZATgOTuvgE/JBa2Ac87/cTraCSHoSZzNoqeHOt 0yJhxqC5jM2Aj20ywNjczO1evBOc+cvHr4tKBjY8MyOT+0Exn+/7K6MWTuEjBhFe3Vsg wy50a5FGhPHWnzx2zc7pdSCOFB3dfOQSK4BoOyb0GjvLLfaWqgZWrxecQ4klUMYwL7Ky YXU1Biv/5dyvfAx9FLr+o72RGaJEJ3CmR5Bc8CRK/cSwQhNW0MteLeD7yGQb36aOV3/0 3dbANvbF8qlH+nyWVHtHV/xSkkk4dpr4fOBa+IbXzkAJAU6QggAZTLjaSNdSOA1vzMkz 9HEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dmarc-filter:dkim-signature :dkim-signature:arc-authentication-results; bh=719B5pWUAEnYcWN9O3VJploJwyrIXp/WLc9PkvnItnI=; b=i3Mb36kU3kYhIO/MV9vLFUh4SYQEcSWJe4fPSiG0cv9WheLYJE9WAjvu4y3tPXE3IQ URtsPnuCkqBvn4F+R/0mO2FhjIx8xEHVUlhnZRs29++jGDQfcqYLPmZWfTJrH3x7GS61 QknNkRy4f7Ah3ny2gqi6BNDHkuLcjSJ3FJIds3X6hUBz919yyj/jNWrYokVNYS8sdq15 dkKtMW4CkHaX5pF2bQW1QFtmHO3Y8XXBV5lEHPCKOwsQfpBXDCGzIKIAC58dJG2R5yFg dtdj+AWPLbl5FYyQ9e/L6ZOSJKrEEgfA3R3SjOj8E2oCdM9IL8ENObvBHjU4X3CLdhz4 G5cQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=nymtImTk; dkim=pass header.i=@codeaurora.org header.s=default header.b=fS4158Ga; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 206-v6si16626041pfw.130.2018.05.22.10.58.57; Tue, 22 May 2018 10:59:11 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=nymtImTk; dkim=pass header.i=@codeaurora.org header.s=default header.b=fS4158Ga; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751713AbeEVR6a (ORCPT + 99 others); Tue, 22 May 2018 13:58:30 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:54652 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751329AbeEVR62 (ORCPT ); Tue, 22 May 2018 13:58:28 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id CE41A60A06; Tue, 22 May 2018 17:58:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1527011907; bh=+4Z+JhWRFyzm7ComnweVCXUSk4ID/A68UaCXPp9xm1g=; h=From:To:Cc:Subject:Date:From; b=nymtImTkm1IjUhCZ+XTYybg2CJv6VkDuLYglouAdmqEpQm3xLUQRkdbv8uXpfXkWN NSkdZNJAoDevIMyFWmdlInHfLYQ4jjTA6BrNONfOfID7of8ZpTOPEfK2ehtN9lpqwj aYr2XHWknF/NRKU/TM18F0C3rTJJi6jVv/HRoM7U= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.0 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 74E4760314; Tue, 22 May 2018 17:58:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1527011906; bh=+4Z+JhWRFyzm7ComnweVCXUSk4ID/A68UaCXPp9xm1g=; h=From:To:Cc:Subject:Date:From; b=fS4158Ga0WpWeZRLK9Ugx+MTtjmEznz/lHJuaJKIg3mk+QPn1fqmJNtk/1gS72d0g sP2p1sbPtvll/unXU9upxv44kXQiOiB6xHmEY2jIwItMWK1j5rfYMgxJYMenGRSugS 7fFG2fr6By47BkhfZojADC2jdsnxAVVRpcefRSp0= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 74E4760314 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 Cc: ryan@finnie.org, linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Sinan Kaya , stable@vger.kernel.org, Bjorn Helgaas , "Rafael J. Wysocki" , Frederick Lawler , Dongdong Liu , Gabriele Paoloni , Keith Busch , linux-kernel@vger.kernel.org (open list) Subject: [PATCH] PCI/portdrv: do not disable device on remove() Date: Tue, 22 May 2018 13:58:00 -0400 Message-Id: <1527011883-21320-1-git-send-email-okaya@codeaurora.org> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 'Commit cc27b735ad3a ("PCI/portdrv: Turn off PCIe services during shutdown")' has been added to kernel to shutdown pending PCIe port service interrupts during reboot so that a newly started kexec kernel wouldn't observe pending interrupts. pcie_port_device_remove() is disabling the root port and switches by calling pci_disable_device() after all PCIe service drivers are shutdown. pci_disable_device() has a much wider impact then port service itself and it prevents all inbound transactions to reach to the system and impacts the entire PCI traffic behind the bridge. Issue is that pcie_port_device_remove() doesn't maintain any coordination with the rest of the PCI device drivers in the system before clearing the bus master bit. This has been found to cause crashes on HP DL360 Gen9 machines during reboot. Besides, kexec is already clearing the bus master bit in pci_device_shutdown() after all PCI drivers are removed. Just remove the extra clear here. Signed-off-by: Sinan Kaya Link: https://bugzilla.kernel.org/show_bug.cgi?id=199779 Fixes: cc27b735ad3a ("PCI/portdrv: Turn off PCIe services during shutdown") Cc: stable@vger.kernel.org Reported-by: Ryan Finnie --- drivers/pci/pcie/portdrv_core.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/pci/pcie/portdrv_core.c b/drivers/pci/pcie/portdrv_core.c index c9c0663..d22a95d 100644 --- a/drivers/pci/pcie/portdrv_core.c +++ b/drivers/pci/pcie/portdrv_core.c @@ -409,7 +409,6 @@ void pcie_port_device_remove(struct pci_dev *dev) { device_for_each_child(&dev->dev, NULL, remove_iter); pci_free_irq_vectors(dev); - pci_disable_device(dev); } /** -- 2.7.4