* [PATCH] cxl: remove unnecessary calling of pci_enable_pcie_error_reporting()
@ 2023-02-13 20:28 Dave Jiang
2023-02-14 1:22 ` Dan Williams
0 siblings, 1 reply; 4+ messages in thread
From: Dave Jiang @ 2023-02-13 20:28 UTC (permalink / raw)
To: linux-cxl; +Cc: dan.j.williams, bhelgaas, ira.weiny, Jonathan.Cameron, lukas
With this [1] commit upstream, pci_enable_pci_error_report() is no longer
necessary for the driver to call. Remove call and related cleanups.
[1]: f26e58bf6f54 ("PCI/AER: Enable error reporting when AER is native")
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
---
drivers/cxl/pci.c | 11 -----------
1 file changed, 11 deletions(-)
diff --git a/drivers/cxl/pci.c b/drivers/cxl/pci.c
index 4cf9a2191602..c87340095a8a 100644
--- a/drivers/cxl/pci.c
+++ b/drivers/cxl/pci.c
@@ -412,11 +412,6 @@ static bool is_cxl_restricted(struct pci_dev *pdev)
return pci_pcie_type(pdev) == PCI_EXP_TYPE_RC_END;
}
-static void disable_aer(void *pdev)
-{
- pci_disable_pcie_error_reporting(pdev);
-}
-
static void free_event_buf(void *buf)
{
kvfree(buf);
@@ -733,12 +728,6 @@ static int cxl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
if (rc)
return rc;
- if (cxlds->regs.ras) {
- pci_enable_pcie_error_reporting(pdev);
- rc = devm_add_action_or_reset(&pdev->dev, disable_aer, pdev);
- if (rc)
- return rc;
- }
pci_save_state(pdev);
return rc;
^ permalink raw reply related [flat|nested] 4+ messages in thread
* RE: [PATCH] cxl: remove unnecessary calling of pci_enable_pcie_error_reporting()
2023-02-13 20:28 [PATCH] cxl: remove unnecessary calling of pci_enable_pcie_error_reporting() Dave Jiang
@ 2023-02-14 1:22 ` Dan Williams
2023-02-14 3:59 ` Dave Jiang
0 siblings, 1 reply; 4+ messages in thread
From: Dan Williams @ 2023-02-14 1:22 UTC (permalink / raw)
To: Dave Jiang, linux-cxl
Cc: dan.j.williams, bhelgaas, ira.weiny, Jonathan.Cameron, lukas
Dave Jiang wrote:
> With this [1] commit upstream, pci_enable_pci_error_report() is no longer
> necessary for the driver to call. Remove call and related cleanups.
>
> [1]: f26e58bf6f54 ("PCI/AER: Enable error reporting when AER is native")
Care to fixup the Documentation as well so others do not follow the same
pattern?
diff --git a/Documentation/PCI/pcieaer-howto.rst b/Documentation/PCI/pcieaer-howto.rst
index 0b36b9ebfa4b..a82802795a06 100644
--- a/Documentation/PCI/pcieaer-howto.rst
+++ b/Documentation/PCI/pcieaer-howto.rst
@@ -135,15 +135,6 @@ hierarchy and links. These errors do not include any device specific
errors because device specific errors will still get sent directly to
the device driver.
-Configure the AER capability structure
---------------------------------------
-
-AER aware drivers of PCI Express component need change the device
-control registers to enable AER. They also could change AER registers,
-including mask and severity registers. Helper function
-pci_enable_pcie_error_reporting could be used to enable AER. See
-section 3.3.
-
Provide callbacks
-----------------
@@ -214,15 +205,6 @@ to mmio_enabled.
helper functions
----------------
-::
-
- int pci_enable_pcie_error_reporting(struct pci_dev *dev);
-
-pci_enable_pcie_error_reporting enables the device to send error
-messages to root port when an error is detected. Note that devices
-don't enable the error reporting by default, so device drivers need
-call this function to enable it.
-
::
int pci_disable_pcie_error_reporting(struct pci_dev *dev);
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] cxl: remove unnecessary calling of pci_enable_pcie_error_reporting()
2023-02-14 1:22 ` Dan Williams
@ 2023-02-14 3:59 ` Dave Jiang
2023-02-14 16:53 ` Dave Jiang
0 siblings, 1 reply; 4+ messages in thread
From: Dave Jiang @ 2023-02-14 3:59 UTC (permalink / raw)
To: Dan Williams, linux-cxl; +Cc: bhelgaas, ira.weiny, Jonathan.Cameron, lukas
On 2/13/23 6:22 PM, Dan Williams wrote:
> Dave Jiang wrote:
>> With this [1] commit upstream, pci_enable_pci_error_report() is no longer
>> necessary for the driver to call. Remove call and related cleanups.
>>
>> [1]: f26e58bf6f54 ("PCI/AER: Enable error reporting when AER is native")
>
> Care to fixup the Documentation as well so others do not follow the same
> pattern?
Sure I'll add the diffs below.
>
> diff --git a/Documentation/PCI/pcieaer-howto.rst b/Documentation/PCI/pcieaer-howto.rst
> index 0b36b9ebfa4b..a82802795a06 100644
> --- a/Documentation/PCI/pcieaer-howto.rst
> +++ b/Documentation/PCI/pcieaer-howto.rst
> @@ -135,15 +135,6 @@ hierarchy and links. These errors do not include any device specific
> errors because device specific errors will still get sent directly to
> the device driver.
>
> -Configure the AER capability structure
> ---------------------------------------
> -
> -AER aware drivers of PCI Express component need change the device
> -control registers to enable AER. They also could change AER registers,
> -including mask and severity registers. Helper function
> -pci_enable_pcie_error_reporting could be used to enable AER. See
> -section 3.3.
> -
> Provide callbacks
> -----------------
>
> @@ -214,15 +205,6 @@ to mmio_enabled.
>
> helper functions
> ----------------
> -::
> -
> - int pci_enable_pcie_error_reporting(struct pci_dev *dev);
> -
> -pci_enable_pcie_error_reporting enables the device to send error
> -messages to root port when an error is detected. Note that devices
> -don't enable the error reporting by default, so device drivers need
> -call this function to enable it.
> -
> ::
>
> int pci_disable_pcie_error_reporting(struct pci_dev *dev);
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] cxl: remove unnecessary calling of pci_enable_pcie_error_reporting()
2023-02-14 3:59 ` Dave Jiang
@ 2023-02-14 16:53 ` Dave Jiang
0 siblings, 0 replies; 4+ messages in thread
From: Dave Jiang @ 2023-02-14 16:53 UTC (permalink / raw)
To: Dan Williams, linux-cxl; +Cc: bhelgaas, ira.weiny, Jonathan.Cameron, lukas
On 2/13/23 8:59 PM, Dave Jiang wrote:
>
>
> On 2/13/23 6:22 PM, Dan Williams wrote:
>> Dave Jiang wrote:
>>> With this [1] commit upstream, pci_enable_pci_error_report() is no
>>> longer
>>> necessary for the driver to call. Remove call and related cleanups.
>>>
>>> [1]: f26e58bf6f54 ("PCI/AER: Enable error reporting when AER is native")
>>
>> Care to fixup the Documentation as well so others do not follow the same
>> pattern?
>
> Sure I'll add the diffs below.
Sent as separate patch:
https://lore.kernel.org/linux-pci/167639333373.777843.2141436875951823865.stgit@djiang5-mobl3.local/T/#u
>
>>
>> diff --git a/Documentation/PCI/pcieaer-howto.rst
>> b/Documentation/PCI/pcieaer-howto.rst
>> index 0b36b9ebfa4b..a82802795a06 100644
>> --- a/Documentation/PCI/pcieaer-howto.rst
>> +++ b/Documentation/PCI/pcieaer-howto.rst
>> @@ -135,15 +135,6 @@ hierarchy and links. These errors do not include
>> any device specific
>> errors because device specific errors will still get sent directly to
>> the device driver.
>> -Configure the AER capability structure
>> ---------------------------------------
>> -
>> -AER aware drivers of PCI Express component need change the device
>> -control registers to enable AER. They also could change AER registers,
>> -including mask and severity registers. Helper function
>> -pci_enable_pcie_error_reporting could be used to enable AER. See
>> -section 3.3.
>> -
>> Provide callbacks
>> -----------------
>> @@ -214,15 +205,6 @@ to mmio_enabled.
>> helper functions
>> ----------------
>> -::
>> -
>> - int pci_enable_pcie_error_reporting(struct pci_dev *dev);
>> -
>> -pci_enable_pcie_error_reporting enables the device to send error
>> -messages to root port when an error is detected. Note that devices
>> -don't enable the error reporting by default, so device drivers need
>> -call this function to enable it.
>> -
>> ::
>> int pci_disable_pcie_error_reporting(struct pci_dev *dev);
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-02-14 16:53 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-13 20:28 [PATCH] cxl: remove unnecessary calling of pci_enable_pcie_error_reporting() Dave Jiang
2023-02-14 1:22 ` Dan Williams
2023-02-14 3:59 ` Dave Jiang
2023-02-14 16:53 ` Dave Jiang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox