aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Patterson <andrew.patterson@hp.com>2010-03-10 16:01:01 +0800
committerHuang Ying <ying.huang@intel.com>2010-03-10 16:01:01 +0800
commit857ea0e4b4bff0c0fd4d2309991158e4358b18e5 (patch)
tree59c3a59fa9e12bb6f36a95f373ebc65a99676052
parentcb0b699c250586682101478c2c05a438fb354b52 (diff)
downloadaer-inject-857ea0e4b4bff0c0fd4d2309991158e4358b18e5.tar.gz
aer-inject: support multiple PCI domains
Add support for multiple PCI domains (segments). This patch requires corresponding support in the aer_inject driver (2.6.33 or later). Signed-off-by: Andrew Patterson <andrew.patterson@hp.com> Signed-off-by: Huang Ying <ying.huang@intel.com>
-rw-r--r--aer.h3
-rw-r--r--aer.lex1
-rw-r--r--aer.y9
3 files changed, 11 insertions, 2 deletions
diff --git a/aer.h b/aer.h
index 2061a93..00d98cd 100644
--- a/aer.h
+++ b/aer.h
@@ -1,6 +1,8 @@
#ifndef AER_H
#define AER_H
+#include <stdint.h>
+
struct aer_error_inj
{
int8_t bus;
@@ -12,6 +14,7 @@ struct aer_error_inj
int32_t header_log1;
int32_t header_log2;
int32_t header_log3;
+ uint16_t domain;
};
#define PCI_ERR_UNC_TRAIN 0x00000001 /* Training */
diff --git a/aer.lex b/aer.lex
index b3c6a30..b79733a 100644
--- a/aer.lex
+++ b/aer.lex
@@ -53,6 +53,7 @@ static struct key {
#define KEY(x) { #x, x }
#define KEYVAL(x,v) { #x, x, v }
KEY(AER),
+ KEY(DOMAIN),
KEY(BUS),
KEY(DEV),
KEY(FN),
diff --git a/aer.y b/aer.y
index 80b002e..f30ad8b 100644
--- a/aer.y
+++ b/aer.y
@@ -27,7 +27,7 @@ static void init(void);
%}
-%token AER BUS DEV FN UNCOR_STATUS COR_STATUS HEADER_LOG
+%token AER DOMAIN BUS DEV FN UNCOR_STATUS COR_STATUS HEADER_LOG
%token TRAIN DLP POISON_TLP FCP COMP_TIME COMP_ABORT UNX_COMP RX_OVER MALF_TLP
%token ECRC UNSUP
%token RCVR BAD_TLP BAD_DLLP REP_ROLL REP_TIMER
@@ -48,7 +48,12 @@ aer: aer_term
aer_term: UNCOR_STATUS uncor_status_list { aerr.uncor_status = $2; }
| COR_STATUS cor_status_list { aerr.cor_status = $2; }
- | BUS NUMBER DEV NUMBER FN NUMBER { aerr.bus = $2;
+ | DOMAIN NUMBER BUS NUMBER DEV NUMBER FN NUMBER { aerr.domain = $2;
+ aerr.bus = $4;
+ aerr.dev = $6;
+ aerr.fn = $8; }
+ | BUS NUMBER DEV NUMBER FN NUMBER { aerr.domain = 0;
+ aerr.bus = $2;
aerr.dev = $4;
aerr.fn = $6; }
| HEADER_LOG NUMBER NUMBER NUMBER NUMBER { aerr.header_log0 = $2;