linux-pikaos-template/patches/nobara/0001-Revert-nvme-pci-drop-redundant-pci_enable_pcie_error.patch

47 lines
1.3 KiB
Diff
Raw Normal View History

2023-11-04 19:37:27 +01:00
From 7d86ca8db51f6b75b5c1470d6294c6f24221f560 Mon Sep 17 00:00:00 2001
From: GloriousEggroll <gloriouseggroll@gmail.com>
Date: Mon, 30 Oct 2023 22:36:19 -0600
Subject: [PATCH] Revert "nvme-pci: drop redundant
pci_enable_pcie_error_reporting()"
This reverts commit 1ad11eafc63ac16e667853bee4273879226d2d1b.
---
drivers/nvme/host/pci.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
index 3f0c9ee09a12..bc11bfe6f87a 100644
--- a/drivers/nvme/host/pci.c
+++ b/drivers/nvme/host/pci.c
@@ -5,6 +5,7 @@
*/
#include <linux/acpi.h>
+#include <linux/aer.h>
#include <linux/async.h>
#include <linux/blkdev.h>
#include <linux/blk-mq.h>
@@ -2537,6 +2538,7 @@ static int nvme_pci_enable(struct nvme_dev *dev)
nvme_map_cmb(dev);
+ pci_enable_pcie_error_reporting(pdev);
pci_save_state(pdev);
result = nvme_pci_configure_admin_queue(dev);
@@ -2601,8 +2603,10 @@ static void nvme_dev_disable(struct nvme_dev *dev, bool shutdown)
nvme_suspend_io_queues(dev);
nvme_suspend_queue(dev, 0);
pci_free_irq_vectors(pdev);
- if (pci_is_enabled(pdev))
+ if (pci_is_enabled(pdev)) {
+ pci_disable_pcie_error_reporting(pdev);
pci_disable_device(pdev);
+ }
nvme_reap_pending_cqes(dev);
nvme_cancel_tagset(&dev->ctrl);
--
2.41.0