diff options
-rw-r--r-- | drivers/pci/pcie/aer/aerdrv.c | 3 | ||||
-rw-r--r-- | drivers/pci/pcie/aer/aerdrv.h | 2 | ||||
-rw-r--r-- | drivers/pci/pcie/aer/aerdrv_core.c | 18 |
3 files changed, 5 insertions, 18 deletions
diff --git a/drivers/pci/pcie/aer/aerdrv.c b/drivers/pci/pcie/aer/aerdrv.c index 4e845ab18643..14081f807e50 100644 --- a/drivers/pci/pcie/aer/aerdrv.c +++ b/drivers/pci/pcie/aer/aerdrv.c | |||
@@ -179,7 +179,8 @@ static void aer_remove(struct pcie_device *dev) | |||
179 | 179 | ||
180 | wait_event(rpc->wait_release, rpc->prod_idx == rpc->cons_idx); | 180 | wait_event(rpc->wait_release, rpc->prod_idx == rpc->cons_idx); |
181 | 181 | ||
182 | aer_delete_rootport(rpc); | 182 | aer_disable_rootport(rpc); |
183 | kfree(rpc); | ||
183 | set_service_data(dev, NULL); | 184 | set_service_data(dev, NULL); |
184 | } | 185 | } |
185 | } | 186 | } |
diff --git a/drivers/pci/pcie/aer/aerdrv.h b/drivers/pci/pcie/aer/aerdrv.h index bd833ea3ba49..b6fc5389dd09 100644 --- a/drivers/pci/pcie/aer/aerdrv.h +++ b/drivers/pci/pcie/aer/aerdrv.h | |||
@@ -118,7 +118,7 @@ static inline pci_ers_result_t merge_result(enum pci_ers_result orig, | |||
118 | 118 | ||
119 | extern struct bus_type pcie_port_bus_type; | 119 | extern struct bus_type pcie_port_bus_type; |
120 | extern void aer_enable_rootport(struct aer_rpc *rpc); | 120 | extern void aer_enable_rootport(struct aer_rpc *rpc); |
121 | extern void aer_delete_rootport(struct aer_rpc *rpc); | 121 | extern void aer_disable_rootport(struct aer_rpc *rpc); |
122 | extern int aer_init(struct pcie_device *dev); | 122 | extern int aer_init(struct pcie_device *dev); |
123 | extern void aer_isr(struct work_struct *work); | 123 | extern void aer_isr(struct work_struct *work); |
124 | extern void aer_print_error(struct pci_dev *dev, struct aer_err_info *info); | 124 | extern void aer_print_error(struct pci_dev *dev, struct aer_err_info *info); |
diff --git a/drivers/pci/pcie/aer/aerdrv_core.c b/drivers/pci/pcie/aer/aerdrv_core.c index 9754a09bf20e..0dcbae126834 100644 --- a/drivers/pci/pcie/aer/aerdrv_core.c +++ b/drivers/pci/pcie/aer/aerdrv_core.c | |||
@@ -629,12 +629,12 @@ void aer_enable_rootport(struct aer_rpc *rpc) | |||
629 | } | 629 | } |
630 | 630 | ||
631 | /** | 631 | /** |
632 | * disable_root_aer - disable Root Port's interrupts when receiving messages | 632 | * aer_disable_rootport - disable Root Port's interrupts when receiving messages |
633 | * @rpc: pointer to a Root Port data structure | 633 | * @rpc: pointer to a Root Port data structure |
634 | * | 634 | * |
635 | * Invoked when PCIe bus unloads AER service driver. | 635 | * Invoked when PCIe bus unloads AER service driver. |
636 | */ | 636 | */ |
637 | static void disable_root_aer(struct aer_rpc *rpc) | 637 | void aer_disable_rootport(struct aer_rpc *rpc) |
638 | { | 638 | { |
639 | struct pci_dev *pdev = rpc->rpd->port; | 639 | struct pci_dev *pdev = rpc->rpd->port; |
640 | u32 reg32; | 640 | u32 reg32; |
@@ -840,20 +840,6 @@ void aer_isr(struct work_struct *work) | |||
840 | } | 840 | } |
841 | 841 | ||
842 | /** | 842 | /** |
843 | * aer_delete_rootport - disable root port aer and delete service data | ||
844 | * @rpc: pointer to a root port device being deleted | ||
845 | * | ||
846 | * Invoked when AER service unloaded on a specific Root Port | ||
847 | */ | ||
848 | void aer_delete_rootport(struct aer_rpc *rpc) | ||
849 | { | ||
850 | /* Disable root port AER itself */ | ||
851 | disable_root_aer(rpc); | ||
852 | |||
853 | kfree(rpc); | ||
854 | } | ||
855 | |||
856 | /** | ||
857 | * aer_init - provide AER initialization | 843 | * aer_init - provide AER initialization |
858 | * @dev: pointer to AER pcie device | 844 | * @dev: pointer to AER pcie device |
859 | * | 845 | * |