943227d2a809f65c2d3fa679781c1584ddbfcbc9
[openwrt/staging/blogic.git] /
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()
6
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.
11
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.
15
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.
19
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>
25 ---
26 drivers/bus/mhi/host/pci_generic.c | 8 +-------
27 1 file changed, 1 insertion(+), 7 deletions(-)
28
29 --- a/drivers/bus/mhi/host/pci_generic.c
30 +++ b/drivers/bus/mhi/host/pci_generic.c
31 @@ -8,7 +8,6 @@
32 * Copyright (C) 2020 Linaro Ltd <loic.poulain@linaro.org>
33 */
34
35 -#include <linux/aer.h>
36 #include <linux/delay.h>
37 #include <linux/device.h>
38 #include <linux/mhi.h>
39 @@ -904,11 +903,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);
42
43 - pci_enable_pcie_error_reporting(pdev);
44 -
45 err = mhi_register_controller(mhi_cntrl, mhi_cntrl_config);
46 if (err)
47 - goto err_disable_reporting;
48 + return err;
49
50 /* MHI bus does not power up the controller by default */
51 err = mhi_prepare_for_power_up(mhi_cntrl);
52 @@ -942,8 +939,6 @@ err_unprepare:
53 mhi_unprepare_after_power_down(mhi_cntrl);
54 err_unregister:
55 mhi_unregister_controller(mhi_cntrl);
56 -err_disable_reporting:
57 - pci_disable_pcie_error_reporting(pdev);
58
59 return err;
60 }
61 @@ -966,7 +961,6 @@ static void mhi_pci_remove(struct pci_de
62 pm_runtime_get_noresume(&pdev->dev);
63
64 mhi_unregister_controller(mhi_cntrl);
65 - pci_disable_pcie_error_reporting(pdev);
66 }
67
68 static void mhi_pci_shutdown(struct pci_dev *pdev)