1 From 6c00e1e4e9817e85b8ba83024cfa88382f898841 Mon Sep 17 00:00:00 2001
2 From: Bjorn Helgaas <bhelgaas@google.com>
3 Date: Tue, 7 Mar 2023 14:16:25 -0600
4 Subject: [PATCH 04/13] bus: mhi: host: pci_generic: Drop redundant
5 pci_enable_pcie_error_reporting()
7 pci_enable_pcie_error_reporting() enables the device to send ERR_*
8 Messages. Since commit <f26e58bf6f54> ("PCI/AER: Enable error reporting
9 when AER is native"), the PCI core does this for all devices during
10 enumeration, so the driver doesn't need to do it itself.
12 Remove the redundant pci_enable_pcie_error_reporting() call from the
13 driver. Also remove the corresponding pci_disable_pcie_error_reporting()
14 from the driver .remove() path.
16 Note that this only controls ERR_* Messages from the device. An ERR_*
17 Message may cause the Root Port to generate an interrupt, depending on the
18 AER Root Error Command register managed by the AER service driver.
20 Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
21 Reviewed-by: Manivannan Sadhasivam <mani@kernel.org>
22 Reviewed-by: Jeffrey Hugo <quic_jhugo@quicinc.com>
23 Link: https://lore.kernel.org/r/20230307201625.879567-1-helgaas@kernel.org
24 Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
26 drivers/bus/mhi/host/pci_generic.c | 8 +-------
27 1 file changed, 1 insertion(+), 7 deletions(-)
29 --- a/drivers/bus/mhi/host/pci_generic.c
30 +++ b/drivers/bus/mhi/host/pci_generic.c
32 * Copyright (C) 2020 Linaro Ltd <loic.poulain@linaro.org>
35 -#include <linux/aer.h>
36 #include <linux/delay.h>
37 #include <linux/device.h>
38 #include <linux/mhi.h>
39 @@ -901,11 +900,9 @@ static int mhi_pci_probe(struct pci_dev
40 mhi_pdev->pci_state = pci_store_saved_state(pdev);
41 pci_load_saved_state(pdev, NULL);
43 - pci_enable_pcie_error_reporting(pdev);
45 err = mhi_register_controller(mhi_cntrl, mhi_cntrl_config);
47 - goto err_disable_reporting;
50 /* MHI bus does not power up the controller by default */
51 err = mhi_prepare_for_power_up(mhi_cntrl);
52 @@ -939,8 +936,6 @@ err_unprepare:
53 mhi_unprepare_after_power_down(mhi_cntrl);
55 mhi_unregister_controller(mhi_cntrl);
56 -err_disable_reporting:
57 - pci_disable_pcie_error_reporting(pdev);
61 @@ -963,7 +958,6 @@ static void mhi_pci_remove(struct pci_de
62 pm_runtime_get_noresume(&pdev->dev);
64 mhi_unregister_controller(mhi_cntrl);
65 - pci_disable_pcie_error_reporting(pdev);
68 static void mhi_pci_shutdown(struct pci_dev *pdev)