reduce AER init error information
PATCH 1/1 reduce AER init error information
PCI-Express AER support in kernel requires BIOS to provide _OSC support to allow the AER Root port service driver to request for native control of AER. If a root port supports AER capablity, but BIOS doesn't provide _OSC for it, aerdriver will print many debug information to system console. Below is a log example.
*******************Error information example************ Evaluate _OSC Set fails. Status = 0x0005 Evaluate _OSC Set fails. Status = 0x0005aer_init: AER service init fails - Run ACPI _OSC fails
aer: probe of 0000:00:02.0:pcie01 failed with error 2 Evaluate _OSC Set fails. Status = 0x0005 Evaluate _OSC Set fails. Status = 0x0005aer_init: AER service init fails - Run ACPI _OSC fails
aer: probe of 0000:00:04.0:pcie01 failed with error 2 Evaluate _OSC Set fails. Status = 0x0005 Evaluate _OSC Set fails. Status = 0x0005aer_init: AER service init fails - Run ACPI _OSC fails
aer: probe of 0000:00:06.0:pcie01 failed with error 2 ******************End of Error information example******
As _OSC is an optional capability of BIOS, such error information looks like overly-verbosed. The patch against kernel 2.6.21 changes it to just print one line report messages if aerdriver fails to attach the root port service device.
Below is an example of new output.
AER service couldn't init device 0000:00:02.0:pcie01 - no _OSC support
---
drivers/pci/pci-acpi.c +2 -6
@@ -55,8 +55,6 @@ acpi_query_osc ( status =acpi_evaluate_object (handle,"_OSC" , &input, &output);if (ACPI_FAILURE (status)) { -printk (KERN_DEBUG -"Evaluate _OSC Set fails. Status = 0x%04x\n" , status); *ret_status = status;return status; }
@@ -124,11 +122,9 @@ acpi_run_osc ( in_params[3 ].buffer.pointer = (u8 *)context; status =acpi_evaluate_object (handle,"_OSC" , &input, &output); -if (ACPI_FAILURE (status)) { -printk (KERN_DEBUG -"Evaluate _OSC Set fails. Status = 0x%04x\n" , status); +if (ACPI_FAILURE (status))return status; - } + out_obj = output.pointer;if (out_obj->type !=ACPI_TYPE_BUFFER ) { printk(KERN_DEBUG
drivers/pci/pcie/aer/aerdrv_acpi.c +4 -11
@@ -27,10 +27,9 @@* Invoked when PCIE bus loads AER service driver. To avoid conflict with * BIOS AER support requires BIOS to yield AER control to OS native driver. **/ -int aer_osc_setup (struct pci_dev *dev) +acpi_status aer_osc_setup (struct pci_dev *dev) { -int retval =OSC_METHOD_RUN_SUCCESS ; -acpi_status status; +acpi_status status =AE_NOT_FOUND ;acpi_handle handle =DEVICE_ACPI_HANDLE (&dev->dev);struct pci_dev *pdev = dev;struct pci_bus *parent;
@@ -51,18 +50,12 @@ int aer_osc_setup(struct pci_dev *dev) }if (!handle) -return OSC_METHOD_NOT_SUPPORTED ; +return status;pci_osc_support_set (OSC_EXT_PCI_CONFIG_SUPPORT ); status =pci_osc_control_set (handle,OSC_PCI_EXPRESS_AER_CONTROL |OSC_PCI_EXPRESS_CAP_STRUCTURE_CONTROL ); -if (ACPI_FAILURE (status)) { -if (status ==AE_SUPPORT ) - retval =OSC_METHOD_NOT_SUPPORTED ; -else - retval =OSC_METHOD_RUN_FAILURE ; - } -return retval; +return status; }
drivers/pci/pcie/aer/aerdrv_core.c +7 -7
@@ -733,19 +733,19 @@ void aer_delete_rootport(struct aer_rpc**/ int aer_init (struct pcie_device *dev) { -int status; +acpi_status status;/* Run _OSC Method */ status =aer_osc_setup (dev->port); -if (status !=OSC_METHOD_RUN_SUCCESS ) { -printk (KERN_DEBUG "%s: AER service init fails - %s\n" , - __FUNCTION__, - (status ==OSC_METHOD_NOT_SUPPORTED ) ? -"No ACPI _OSC support" :"Run ACPI _OSC fails" ); +if (ACPI_FAILURE (status)) { +printk (KERN_DEBUG "AER service couldn't init device %s - %s\n" , + dev->device.bus_id, + (status ==AE_SUPPORT || status ==AE_NOT_FOUND ) ? +"no _OSC support" :"Run ACPI _OSC fails" );if (!forceload) -return status; +return -ENXIO ; }return AER_SUCCESS ;
drivers/pci/pcie/aer/aerdrv.h +3 -5
@@ -9,6 +9,8 @@#define _AERDRV_H_#include <linux/pcieport_if.h> +#include <linux/acpi.h> +#include <linux/pci-acpi.h> #include <linux/aer.h> #define AER_NONFATAL 0
@@ -18,10 +20,6 @@#define AER_ERROR_MASK 0x001fffff#define AER_ERROR (d) (d & AER_ERROR_MASK) -#define OSC_METHOD_RUN_SUCCESS 0 -#define OSC_METHOD_NOT_SUPPORTED 1 -#define OSC_METHOD_RUN_FAILURE 2 -/* Root Error Status Register Bits */ #define ROOT_ERR_STATUS_MASKS 0x0f
@@ -120,6 +118,6 @@ extern void aer_delete_rootport(struct aextern int aer_init (struct pcie_device *dev);extern void aer_isr (struct work_struct *work);extern void aer_print_error (struct pci_dev *dev,struct aer_err_info *info); -extern int aer_osc_setup (struct pci_dev *dev); +extern acpi_status aer_osc_setup (struct pci_dev *dev);#endif //_AERDRV_H_
Hi all,
Zhang, Yanmin napisał(a):
Quoted 27 lines
PCI-Express AER support in kernel requires BIOS to provide
_OSCsupport to allow the AER Root port service driver to request for native control of AER. If a root port supports AER capablity, but BIOS doesn't provide_OSCfor it, aerdriver will print many debug information to system console. Below is a log example.*******************Error information example************ Evaluate
_OSCSet fails. Status =0x0005Evaluate_OSCSet fails. Status =0x0005aer_init: AER service init fails - Run ACPI_OSCfails
aer: probe of 0000:00:02.0:pcie01 failed with error 2 Evaluate_OSCSet fails. Status =0x0005Evaluate_OSCSet fails. Status =0x0005aer_init: AER service init fails - Run ACPI_OSCfails
aer: probe of 0000:00:04.0:pcie01 failed with error 2 Evaluate_OSCSet fails. Status =0x0005Evaluate_OSCSet fails. Status =0x0005aer_init: AER service init fails - Run ACPI_OSCfails
aer: probe of 0000:00:06.0:pcie01 failed with error 2 ******************End of Error information example******As
_OSCis an optional capability of BIOS, such error information looks like overly-verbosed. The patch against kernel 2.6.21 changes it to just print one line report messages if aerdriver fails to attach the root port service device.
Quoted 8 lines
Below is an example of new output.
AER service couldn't init device 0000:00:02.0:pcie01 - no_OSCsupportSigned-off-by Zhang Yanmin <[email protected]>---
[..]
This patch fixes a 2.6.21 regression. Please add this to the -stable and mainline queue.
Regards,
Michal
Signature · 2 lines
"Najbardziej brakowało mi twojego milczenia." -- Andrzej Sapkowski "Coś więcej"
Quoted 34 lines · Michal Piotrowski
Hi all,
Zhang, Yanmin napisa??(a):
Quoted 31 lines
PCI-Express AER support in kernel requires BIOS to provide
_OSCsupport to allow the AER Root port service driver to request for native control of AER. If a root port supports AER capablity, but BIOS doesn't provide_OSCfor it, aerdriver will print many debug information to system console. Below is a log example.*******************Error information example************ Evaluate
_OSCSet fails. Status =0x0005Evaluate_OSCSet fails. Status =0x0005aer_init: AER service init fails - Run ACPI_OSCfails
aer: probe of 0000:00:02.0:pcie01 failed with error 2 Evaluate_OSCSet fails. Status =0x0005Evaluate_OSCSet fails. Status =0x0005aer_init: AER service init fails - Run ACPI_OSCfails
aer: probe of 0000:00:04.0:pcie01 failed with error 2 Evaluate_OSCSet fails. Status =0x0005Evaluate_OSCSet fails. Status =0x0005aer_init: AER service init fails - Run ACPI_OSCfails
aer: probe of 0000:00:06.0:pcie01 failed with error 2 ******************End of Error information example******As
_OSCis an optional capability of BIOS, such error information looks like overly-verbosed. The patch against kernel 2.6.21 changes it to just print one line report messages if aerdriver fails to attach the root port service device.Below is an example of new output.
AER service couldn't init device 0000:00:02.0:pcie01 - no_OSCsupport
Quoted 7 lines
Quoted 4 lines
Signed-off-by Zhang Yanmin <[email protected]>---
[..]
This patch fixes a 2.6.21 regression. Please add this to the -stable and mainline queue.
Care to forward the above patch to the [email protected] address after it goes into Linus's tree?
thanks,
greg k-h
Quoted 3 lines · Greg KH
Care to forward the above patch to the [email protected] address after it goes into Linus's tree?
.. talking about going to my tree, where _is_ it? It's not in my mailbox, at least..
Linus
Quoted 9 lines · Linus Torvalds
Quoted 3 lines · Greg KH
Care to forward the above patch to the [email protected] address after it goes into Linus's tree?
.. talking about going to my tree, where _is_ it? It's not in my mailbox, at least..
I tried to get this to work for the last round of PCI patches that I sent you yesterday, but it had build problems, which I need to spend some time fixing up :(
thanks,
greg k-h
Quoted 8 lines · Greg KH
Quoted 7 lines · Linus Torvalds
Quoted 3 lines · Greg KH
Care to forward the above patch to the [email protected] address after it goes into Linus's tree?
Quoted 7 lines
Quoted 2 lines
.. talking about going to my tree, where _is_ it? It's not in my mailbox, at least..
I tried to get this to work for the last round of PCI patches that I sent you yesterday, but it had build problems, which I need to spend some time fixing up :(
I fixed by patch at http://marc.info/?l=linux-kernel&m=117783233918191&w=2.
Later on, someone found if CONFIG_ACPI=n, there is a compilation error. Then, I sent out a new patch to fix the compilation error, but another guy wants AER driver support although CONFIG_ACPI=n. He sent out the 3rd patch to fix the compilation error and enables AER driver when CONFIG_ACPI=n.
So pls. apply 2 patches.
1) http://marc.info/?l=linux-kernel&m=117783233918191&w=2;
2) http://marc.info/?l=linux-mm-commits&m=118046936720790&w=2
When patch 2 is applied to stable kernel 2.6.21.3, there is a fuzz warning. It doesn't matter.
Sorry for replying so late.
Yanmin