* [PATCH] reduce AER init error information
@ 2007-04-29 7:38 Zhang, Yanmin
2007-05-29 14:10 ` Michal Piotrowski
0 siblings, 1 reply; 6+ messages in thread
From: Zhang, Yanmin @ 2007-04-29 7:38 UTC (permalink / raw)
To: LKML; +Cc: lenb, us15, gregkh, davej
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 = 0x0005
aer_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 = 0x0005
aer_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 = 0x0005
aer_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
Signed-off-by: Zhang Yanmin <yanmin.zhang@intel.com>
---
diff -Nraup linux-2.6.21/drivers/pci/pci-acpi.c linux-2.6.21_aer/drivers/pci/pci-acpi.c
--- linux-2.6.21/drivers/pci/pci-acpi.c 2007-02-05 02:44:54.000000000 +0800
+++ linux-2.6.21_aer/drivers/pci/pci-acpi.c 2007-04-30 22:03:08.000000000 +0800
@@ -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
diff -Nraup linux-2.6.21/drivers/pci/pcie/aer/aerdrv_acpi.c linux-2.6.21_aer/drivers/pci/pcie/aer/aerdrv_acpi.c
--- linux-2.6.21/drivers/pci/pcie/aer/aerdrv_acpi.c 2007-02-05 02:44:54.000000000 +0800
+++ linux-2.6.21_aer/drivers/pci/pcie/aer/aerdrv_acpi.c 2007-04-30 21:06:43.000000000 +0800
@@ -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;
}
diff -Nraup linux-2.6.21/drivers/pci/pcie/aer/aerdrv_core.c linux-2.6.21_aer/drivers/pci/pcie/aer/aerdrv_core.c
--- linux-2.6.21/drivers/pci/pcie/aer/aerdrv_core.c 2007-02-05 02:44:54.000000000 +0800
+++ linux-2.6.21_aer/drivers/pci/pcie/aer/aerdrv_core.c 2007-04-30 22:33:16.000000000 +0800
@@ -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;
diff -Nraup linux-2.6.21/drivers/pci/pcie/aer/aerdrv.h linux-2.6.21_aer/drivers/pci/pcie/aer/aerdrv.h
--- linux-2.6.21/drivers/pci/pcie/aer/aerdrv.h 2007-04-30 20:25:38.000000000 +0800
+++ linux-2.6.21_aer/drivers/pci/pcie/aer/aerdrv.h 2007-04-30 21:26:43.000000000 +0800
@@ -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 a
extern 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_
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH] reduce AER init error information
2007-04-29 7:38 [PATCH] reduce AER init error information Zhang, Yanmin
@ 2007-05-29 14:10 ` Michal Piotrowski
2007-05-29 15:57 ` Greg KH
0 siblings, 1 reply; 6+ messages in thread
From: Michal Piotrowski @ 2007-05-29 14:10 UTC (permalink / raw)
To: Zhang, Yanmin
Cc: LKML, lenb, us15, gregkh, davej, Linus Torvalds, Andrew Morton
Hi all,
Zhang, Yanmin napisał(a):
> 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 = 0x0005
> aer_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 = 0x0005
> aer_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 = 0x0005
> aer_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
>
>
> Signed-off-by: Zhang Yanmin <yanmin.zhang@intel.com>
>
> ---
>
[..]
This patch fixes a 2.6.21 regression. Please add this to the -stable and mainline queue.
Regards,
Michal
--
"Najbardziej brakowało mi twojego milczenia."
-- Andrzej Sapkowski "Coś więcej"
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] reduce AER init error information
2007-05-29 14:10 ` Michal Piotrowski
@ 2007-05-29 15:57 ` Greg KH
2007-05-29 21:06 ` Linus Torvalds
0 siblings, 1 reply; 6+ messages in thread
From: Greg KH @ 2007-05-29 15:57 UTC (permalink / raw)
To: Michal Piotrowski
Cc: Zhang, Yanmin, LKML, lenb, us15, davej, Linus Torvalds,
Andrew Morton
On Tue, May 29, 2007 at 04:10:14PM +0200, Michal Piotrowski wrote:
> Hi all,
>
> Zhang, Yanmin napisa??(a):
> > 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 = 0x0005
> > aer_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 = 0x0005
> > aer_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 = 0x0005
> > aer_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
> >
> >
> > Signed-off-by: Zhang Yanmin <yanmin.zhang@intel.com>
> >
> > ---
> >
> [..]
>
> 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 stable@kernel.org address after
it goes into Linus's tree?
thanks,
greg k-h
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] reduce AER init error information
2007-05-29 15:57 ` Greg KH
@ 2007-05-29 21:06 ` Linus Torvalds
2007-06-01 12:04 ` Greg KH
0 siblings, 1 reply; 6+ messages in thread
From: Linus Torvalds @ 2007-05-29 21:06 UTC (permalink / raw)
To: Greg KH
Cc: Michal Piotrowski, Zhang, Yanmin, LKML, lenb, us15, davej,
Andrew Morton
On Tue, 29 May 2007, Greg KH wrote:
>
> Care to forward the above patch to the stable@kernel.org 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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] reduce AER init error information
2007-05-29 21:06 ` Linus Torvalds
@ 2007-06-01 12:04 ` Greg KH
2007-06-04 3:49 ` Zhang, Yanmin
0 siblings, 1 reply; 6+ messages in thread
From: Greg KH @ 2007-06-01 12:04 UTC (permalink / raw)
To: Linus Torvalds
Cc: Michal Piotrowski, Zhang, Yanmin, LKML, lenb, us15, davej,
Andrew Morton
On Tue, May 29, 2007 at 02:06:52PM -0700, Linus Torvalds wrote:
>
>
> On Tue, 29 May 2007, Greg KH wrote:
> >
> > Care to forward the above patch to the stable@kernel.org 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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] reduce AER init error information
2007-06-01 12:04 ` Greg KH
@ 2007-06-04 3:49 ` Zhang, Yanmin
0 siblings, 0 replies; 6+ messages in thread
From: Zhang, Yanmin @ 2007-06-04 3:49 UTC (permalink / raw)
To: Greg KH
Cc: Linus Torvalds, Michal Piotrowski, LKML, lenb, us15, davej,
Andrew Morton
On Fri, 2007-06-01 at 05:04 -0700, Greg KH wrote:
> On Tue, May 29, 2007 at 02:06:52PM -0700, Linus Torvalds wrote:
> >
> >
> > On Tue, 29 May 2007, Greg KH wrote:
> > >
> > > Care to forward the above patch to the stable@kernel.org 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 :(
>
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
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2007-06-04 3:50 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-29 7:38 [PATCH] reduce AER init error information Zhang, Yanmin
2007-05-29 14:10 ` Michal Piotrowski
2007-05-29 15:57 ` Greg KH
2007-05-29 21:06 ` Linus Torvalds
2007-06-01 12:04 ` Greg KH
2007-06-04 3:49 ` Zhang, Yanmin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox