| 
									
										
										
										
											2006-07-31 15:21:33 +08:00
										 |  |  | /*
 | 
					
						
							|  |  |  |  * drivers/pci/pcie/aer/aerdrv_errprint.c | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  * This file is subject to the terms and conditions of the GNU General Public | 
					
						
							|  |  |  |  * License.  See the file "COPYING" in the main directory of this archive | 
					
						
							|  |  |  |  * for more details. | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  * Format error messages and print them to console. | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  * Copyright (C) 2006 Intel Corp. | 
					
						
							|  |  |  |  *	Tom Long Nguyen (tom.l.nguyen@intel.com) | 
					
						
							|  |  |  |  *	Zhang Yanmin (yanmin.zhang@intel.com) | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #include <linux/module.h>
 | 
					
						
							|  |  |  | #include <linux/pci.h>
 | 
					
						
							|  |  |  | #include <linux/kernel.h>
 | 
					
						
							|  |  |  | #include <linux/errno.h>
 | 
					
						
							|  |  |  | #include <linux/pm.h>
 | 
					
						
							|  |  |  | #include <linux/suspend.h>
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #include "aerdrv.h"
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #define AER_AGENT_RECEIVER		0
 | 
					
						
							|  |  |  | #define AER_AGENT_REQUESTER		1
 | 
					
						
							|  |  |  | #define AER_AGENT_COMPLETER		2
 | 
					
						
							|  |  |  | #define AER_AGENT_TRANSMITTER		3
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-09-07 17:08:59 +09:00
										 |  |  | #define AER_AGENT_REQUESTER_MASK(t)	((t == AER_CORRECTABLE) ?	\
 | 
					
						
							|  |  |  | 	0 : (PCI_ERR_UNC_COMP_TIME|PCI_ERR_UNC_UNSUP)) | 
					
						
							|  |  |  | #define AER_AGENT_COMPLETER_MASK(t)	((t == AER_CORRECTABLE) ?	\
 | 
					
						
							|  |  |  | 	0 : PCI_ERR_UNC_COMP_ABORT) | 
					
						
							|  |  |  | #define AER_AGENT_TRANSMITTER_MASK(t)	((t == AER_CORRECTABLE) ?	\
 | 
					
						
							|  |  |  | 	(PCI_ERR_COR_REP_ROLL|PCI_ERR_COR_REP_TIMER) : 0) | 
					
						
							| 
									
										
										
										
											2006-07-31 15:21:33 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  | #define AER_GET_AGENT(t, e)						\
 | 
					
						
							| 
									
										
										
										
											2009-09-07 17:08:59 +09:00
										 |  |  | 	((e & AER_AGENT_COMPLETER_MASK(t)) ? AER_AGENT_COMPLETER :	\ | 
					
						
							|  |  |  | 	(e & AER_AGENT_REQUESTER_MASK(t)) ? AER_AGENT_REQUESTER :	\ | 
					
						
							|  |  |  | 	(e & AER_AGENT_TRANSMITTER_MASK(t)) ? AER_AGENT_TRANSMITTER :	\ | 
					
						
							| 
									
										
										
										
											2006-07-31 15:21:33 +08:00
										 |  |  | 	AER_AGENT_RECEIVER) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #define AER_PHYSICAL_LAYER_ERROR	0
 | 
					
						
							|  |  |  | #define AER_DATA_LINK_LAYER_ERROR	1
 | 
					
						
							|  |  |  | #define AER_TRANSACTION_LAYER_ERROR	2
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-09-07 17:08:59 +09:00
										 |  |  | #define AER_PHYSICAL_LAYER_ERROR_MASK(t) ((t == AER_CORRECTABLE) ?	\
 | 
					
						
							|  |  |  | 	PCI_ERR_COR_RCVR : 0) | 
					
						
							|  |  |  | #define AER_DATA_LINK_LAYER_ERROR_MASK(t) ((t == AER_CORRECTABLE) ?	\
 | 
					
						
							|  |  |  | 	(PCI_ERR_COR_BAD_TLP|						\ | 
					
						
							|  |  |  | 	PCI_ERR_COR_BAD_DLLP|						\ | 
					
						
							|  |  |  | 	PCI_ERR_COR_REP_ROLL|						\ | 
					
						
							|  |  |  | 	PCI_ERR_COR_REP_TIMER) : PCI_ERR_UNC_DLP) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #define AER_GET_LAYER_ERROR(t, e)					\
 | 
					
						
							|  |  |  | 	((e & AER_PHYSICAL_LAYER_ERROR_MASK(t)) ? AER_PHYSICAL_LAYER_ERROR : \ | 
					
						
							|  |  |  | 	(e & AER_DATA_LINK_LAYER_ERROR_MASK(t)) ? AER_DATA_LINK_LAYER_ERROR : \ | 
					
						
							|  |  |  | 	AER_TRANSACTION_LAYER_ERROR) | 
					
						
							| 
									
										
										
										
											2006-07-31 15:21:33 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
											  
											
												PCI: pcie, aer: change error print format
Use dev_printk like format.
Sample (real machine + dummy error injected by aer-inject):
- Before:
+------ PCI-Express Device Error ------+
Error Severity          : Corrected
PCIE Bus Error type     : Data Link Layer
Bad TLP                 :
Receiver ID             : 2800
VendorID=8086h, DeviceID=1096h, Bus=28h, Device=00h, Function=00h
+------ PCI-Express Device Error ------+
Error Severity          : Corrected
PCIE Bus Error type     : Data Link Layer
Bad TLP                 :
Bad DLLP                :
Receiver ID             : 2801
VendorID=8086h, DeviceID=1096h, Bus=28h, Device=00h, Function=01h
Error of this Agent(2801) is reported first
- After:
pcieport-driver 0000:00:02.0: AER: Multiple Corrected error received: id=2801
e1000e 0000:28:00.0: PCIE Bus Error: severity=Corrected, type=Data Link Layer, id=2800(Receiver ID)
e1000e 0000:28:00.0:   device [8086:1096] error status/mask=00000040/00000000
e1000e 0000:28:00.0:    [ 6] Bad TLP
e1000e 0000:28:00.1: PCIE Bus Error: severity=Corrected, type=Data Link Layer, id=2801(Receiver ID)
e1000e 0000:28:00.1:   device [8086:1096] error status/mask=000000c0/00000000
e1000e 0000:28:00.1:    [ 6] Bad TLP
e1000e 0000:28:00.1:    [ 7] Bad DLLP
e1000e 0000:28:00.1:   Error of this Agent(2801) is reported first
Signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
											
										 
											2009-09-07 17:16:45 +09:00
										 |  |  | #define AER_PR(info, pdev, fmt, args...)				\
 | 
					
						
							|  |  |  | 	printk("%s%s %s: " fmt, (info->severity == AER_CORRECTABLE) ?	\ | 
					
						
							|  |  |  | 		KERN_WARNING : KERN_ERR, dev_driver_string(&pdev->dev),	\ | 
					
						
							|  |  |  | 		dev_name(&pdev->dev), ## args) | 
					
						
							| 
									
										
										
										
											2009-09-07 17:08:14 +09:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2006-07-31 15:21:33 +08:00
										 |  |  | /*
 | 
					
						
							|  |  |  |  * AER error strings | 
					
						
							|  |  |  |  */ | 
					
						
							| 
									
										
											  
											
												PCI: pcie, aer: checkpatch style cleanup in pcie/aer/*
Before:
 drivers/pci/pcie/aer/aer_inject.c
  total: 4 errors, 4 warnings, 473 lines checked
 drivers/pci/pcie/aer/aerdrv.c
  total: 5 errors, 2 warnings, 333 lines checked
 drivers/pci/pcie/aer/aerdrv.h
  total: 1 errors, 0 warnings, 139 lines checked
 drivers/pci/pcie/aer/aerdrv_core.c
  total: 4 errors, 3 warnings, 872 lines checked
 drivers/pci/pcie/aer/aerdrv_errprint.c
  total: 12 errors, 11 warnings, 248 lines checked
After:
 drivers/pci/pcie/aer/aer_inject.c
  total: 0 errors, 0 warnings, 466 lines checked
 drivers/pci/pcie/aer/aerdrv.c
  total: 0 errors, 0 warnings, 335 lines checked
 drivers/pci/pcie/aer/aerdrv.h
  total: 0 errors, 0 warnings, 139 lines checked
 drivers/pci/pcie/aer/aerdrv_core.c
  total: 0 errors, 0 warnings, 869 lines checked
 drivers/pci/pcie/aer/aerdrv_errprint.c
  total: 0 errors, 10 warnings, 247 lines checked
Signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Reviewed-by: Andrew Patterson <andrew.patterson@hp.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
											
										 
											2009-09-07 17:07:29 +09:00
										 |  |  | static char *aer_error_severity_string[] = { | 
					
						
							| 
									
										
										
										
											2006-07-31 15:21:33 +08:00
										 |  |  | 	"Uncorrected (Non-Fatal)", | 
					
						
							|  |  |  | 	"Uncorrected (Fatal)", | 
					
						
							|  |  |  | 	"Corrected" | 
					
						
							|  |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
											  
											
												PCI: pcie, aer: checkpatch style cleanup in pcie/aer/*
Before:
 drivers/pci/pcie/aer/aer_inject.c
  total: 4 errors, 4 warnings, 473 lines checked
 drivers/pci/pcie/aer/aerdrv.c
  total: 5 errors, 2 warnings, 333 lines checked
 drivers/pci/pcie/aer/aerdrv.h
  total: 1 errors, 0 warnings, 139 lines checked
 drivers/pci/pcie/aer/aerdrv_core.c
  total: 4 errors, 3 warnings, 872 lines checked
 drivers/pci/pcie/aer/aerdrv_errprint.c
  total: 12 errors, 11 warnings, 248 lines checked
After:
 drivers/pci/pcie/aer/aer_inject.c
  total: 0 errors, 0 warnings, 466 lines checked
 drivers/pci/pcie/aer/aerdrv.c
  total: 0 errors, 0 warnings, 335 lines checked
 drivers/pci/pcie/aer/aerdrv.h
  total: 0 errors, 0 warnings, 139 lines checked
 drivers/pci/pcie/aer/aerdrv_core.c
  total: 0 errors, 0 warnings, 869 lines checked
 drivers/pci/pcie/aer/aerdrv_errprint.c
  total: 0 errors, 10 warnings, 247 lines checked
Signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Reviewed-by: Andrew Patterson <andrew.patterson@hp.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
											
										 
											2009-09-07 17:07:29 +09:00
										 |  |  | static char *aer_error_layer[] = { | 
					
						
							| 
									
										
										
										
											2006-07-31 15:21:33 +08:00
										 |  |  | 	"Physical Layer", | 
					
						
							|  |  |  | 	"Data Link Layer", | 
					
						
							|  |  |  | 	"Transaction Layer" | 
					
						
							|  |  |  | }; | 
					
						
							| 
									
										
											  
											
												PCI: pcie, aer: checkpatch style cleanup in pcie/aer/*
Before:
 drivers/pci/pcie/aer/aer_inject.c
  total: 4 errors, 4 warnings, 473 lines checked
 drivers/pci/pcie/aer/aerdrv.c
  total: 5 errors, 2 warnings, 333 lines checked
 drivers/pci/pcie/aer/aerdrv.h
  total: 1 errors, 0 warnings, 139 lines checked
 drivers/pci/pcie/aer/aerdrv_core.c
  total: 4 errors, 3 warnings, 872 lines checked
 drivers/pci/pcie/aer/aerdrv_errprint.c
  total: 12 errors, 11 warnings, 248 lines checked
After:
 drivers/pci/pcie/aer/aer_inject.c
  total: 0 errors, 0 warnings, 466 lines checked
 drivers/pci/pcie/aer/aerdrv.c
  total: 0 errors, 0 warnings, 335 lines checked
 drivers/pci/pcie/aer/aerdrv.h
  total: 0 errors, 0 warnings, 139 lines checked
 drivers/pci/pcie/aer/aerdrv_core.c
  total: 0 errors, 0 warnings, 869 lines checked
 drivers/pci/pcie/aer/aerdrv_errprint.c
  total: 0 errors, 10 warnings, 247 lines checked
Signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Reviewed-by: Andrew Patterson <andrew.patterson@hp.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
											
										 
											2009-09-07 17:07:29 +09:00
										 |  |  | static char *aer_correctable_error_string[] = { | 
					
						
							|  |  |  | 	"Receiver Error        ",	/* Bit Position 0	*/ | 
					
						
							| 
									
										
										
										
											2006-07-31 15:21:33 +08:00
										 |  |  | 	NULL, | 
					
						
							|  |  |  | 	NULL, | 
					
						
							|  |  |  | 	NULL, | 
					
						
							|  |  |  | 	NULL, | 
					
						
							|  |  |  | 	NULL, | 
					
						
							| 
									
										
											  
											
												PCI: pcie, aer: checkpatch style cleanup in pcie/aer/*
Before:
 drivers/pci/pcie/aer/aer_inject.c
  total: 4 errors, 4 warnings, 473 lines checked
 drivers/pci/pcie/aer/aerdrv.c
  total: 5 errors, 2 warnings, 333 lines checked
 drivers/pci/pcie/aer/aerdrv.h
  total: 1 errors, 0 warnings, 139 lines checked
 drivers/pci/pcie/aer/aerdrv_core.c
  total: 4 errors, 3 warnings, 872 lines checked
 drivers/pci/pcie/aer/aerdrv_errprint.c
  total: 12 errors, 11 warnings, 248 lines checked
After:
 drivers/pci/pcie/aer/aer_inject.c
  total: 0 errors, 0 warnings, 466 lines checked
 drivers/pci/pcie/aer/aerdrv.c
  total: 0 errors, 0 warnings, 335 lines checked
 drivers/pci/pcie/aer/aerdrv.h
  total: 0 errors, 0 warnings, 139 lines checked
 drivers/pci/pcie/aer/aerdrv_core.c
  total: 0 errors, 0 warnings, 869 lines checked
 drivers/pci/pcie/aer/aerdrv_errprint.c
  total: 0 errors, 10 warnings, 247 lines checked
Signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Reviewed-by: Andrew Patterson <andrew.patterson@hp.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
											
										 
											2009-09-07 17:07:29 +09:00
										 |  |  | 	"Bad TLP               ",	/* Bit Position 6	*/ | 
					
						
							|  |  |  | 	"Bad DLLP              ",	/* Bit Position 7	*/ | 
					
						
							|  |  |  | 	"RELAY_NUM Rollover    ",	/* Bit Position 8	*/ | 
					
						
							| 
									
										
										
										
											2006-07-31 15:21:33 +08:00
										 |  |  | 	NULL, | 
					
						
							|  |  |  | 	NULL, | 
					
						
							|  |  |  | 	NULL, | 
					
						
							| 
									
										
											  
											
												PCI: pcie, aer: checkpatch style cleanup in pcie/aer/*
Before:
 drivers/pci/pcie/aer/aer_inject.c
  total: 4 errors, 4 warnings, 473 lines checked
 drivers/pci/pcie/aer/aerdrv.c
  total: 5 errors, 2 warnings, 333 lines checked
 drivers/pci/pcie/aer/aerdrv.h
  total: 1 errors, 0 warnings, 139 lines checked
 drivers/pci/pcie/aer/aerdrv_core.c
  total: 4 errors, 3 warnings, 872 lines checked
 drivers/pci/pcie/aer/aerdrv_errprint.c
  total: 12 errors, 11 warnings, 248 lines checked
After:
 drivers/pci/pcie/aer/aer_inject.c
  total: 0 errors, 0 warnings, 466 lines checked
 drivers/pci/pcie/aer/aerdrv.c
  total: 0 errors, 0 warnings, 335 lines checked
 drivers/pci/pcie/aer/aerdrv.h
  total: 0 errors, 0 warnings, 139 lines checked
 drivers/pci/pcie/aer/aerdrv_core.c
  total: 0 errors, 0 warnings, 869 lines checked
 drivers/pci/pcie/aer/aerdrv_errprint.c
  total: 0 errors, 10 warnings, 247 lines checked
Signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Reviewed-by: Andrew Patterson <andrew.patterson@hp.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
											
										 
											2009-09-07 17:07:29 +09:00
										 |  |  | 	"Replay Timer Timeout  ",	/* Bit Position 12	*/ | 
					
						
							|  |  |  | 	"Advisory Non-Fatal    ",	/* Bit Position 13	*/ | 
					
						
							| 
									
										
										
										
											2006-07-31 15:21:33 +08:00
										 |  |  | 	NULL, | 
					
						
							|  |  |  | 	NULL, | 
					
						
							|  |  |  | 	NULL, | 
					
						
							|  |  |  | 	NULL, | 
					
						
							|  |  |  | 	NULL, | 
					
						
							|  |  |  | 	NULL, | 
					
						
							|  |  |  | 	NULL, | 
					
						
							|  |  |  | 	NULL, | 
					
						
							|  |  |  | 	NULL, | 
					
						
							|  |  |  | 	NULL, | 
					
						
							|  |  |  | 	NULL, | 
					
						
							|  |  |  | 	NULL, | 
					
						
							|  |  |  | 	NULL, | 
					
						
							|  |  |  | 	NULL, | 
					
						
							|  |  |  | 	NULL, | 
					
						
							|  |  |  | 	NULL, | 
					
						
							|  |  |  | 	NULL, | 
					
						
							|  |  |  | 	NULL, | 
					
						
							|  |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
											  
											
												PCI: pcie, aer: checkpatch style cleanup in pcie/aer/*
Before:
 drivers/pci/pcie/aer/aer_inject.c
  total: 4 errors, 4 warnings, 473 lines checked
 drivers/pci/pcie/aer/aerdrv.c
  total: 5 errors, 2 warnings, 333 lines checked
 drivers/pci/pcie/aer/aerdrv.h
  total: 1 errors, 0 warnings, 139 lines checked
 drivers/pci/pcie/aer/aerdrv_core.c
  total: 4 errors, 3 warnings, 872 lines checked
 drivers/pci/pcie/aer/aerdrv_errprint.c
  total: 12 errors, 11 warnings, 248 lines checked
After:
 drivers/pci/pcie/aer/aer_inject.c
  total: 0 errors, 0 warnings, 466 lines checked
 drivers/pci/pcie/aer/aerdrv.c
  total: 0 errors, 0 warnings, 335 lines checked
 drivers/pci/pcie/aer/aerdrv.h
  total: 0 errors, 0 warnings, 139 lines checked
 drivers/pci/pcie/aer/aerdrv_core.c
  total: 0 errors, 0 warnings, 869 lines checked
 drivers/pci/pcie/aer/aerdrv_errprint.c
  total: 0 errors, 10 warnings, 247 lines checked
Signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Reviewed-by: Andrew Patterson <andrew.patterson@hp.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
											
										 
											2009-09-07 17:07:29 +09:00
										 |  |  | static char *aer_uncorrectable_error_string[] = { | 
					
						
							| 
									
										
										
										
											2006-07-31 15:21:33 +08:00
										 |  |  | 	NULL, | 
					
						
							|  |  |  | 	NULL, | 
					
						
							|  |  |  | 	NULL, | 
					
						
							|  |  |  | 	NULL, | 
					
						
							|  |  |  | 	"Data Link Protocol    ",	/* Bit Position 4	*/ | 
					
						
							|  |  |  | 	NULL, | 
					
						
							|  |  |  | 	NULL, | 
					
						
							|  |  |  | 	NULL, | 
					
						
							|  |  |  | 	NULL, | 
					
						
							|  |  |  | 	NULL, | 
					
						
							|  |  |  | 	NULL, | 
					
						
							|  |  |  | 	NULL, | 
					
						
							| 
									
										
											  
											
												PCI: pcie, aer: checkpatch style cleanup in pcie/aer/*
Before:
 drivers/pci/pcie/aer/aer_inject.c
  total: 4 errors, 4 warnings, 473 lines checked
 drivers/pci/pcie/aer/aerdrv.c
  total: 5 errors, 2 warnings, 333 lines checked
 drivers/pci/pcie/aer/aerdrv.h
  total: 1 errors, 0 warnings, 139 lines checked
 drivers/pci/pcie/aer/aerdrv_core.c
  total: 4 errors, 3 warnings, 872 lines checked
 drivers/pci/pcie/aer/aerdrv_errprint.c
  total: 12 errors, 11 warnings, 248 lines checked
After:
 drivers/pci/pcie/aer/aer_inject.c
  total: 0 errors, 0 warnings, 466 lines checked
 drivers/pci/pcie/aer/aerdrv.c
  total: 0 errors, 0 warnings, 335 lines checked
 drivers/pci/pcie/aer/aerdrv.h
  total: 0 errors, 0 warnings, 139 lines checked
 drivers/pci/pcie/aer/aerdrv_core.c
  total: 0 errors, 0 warnings, 869 lines checked
 drivers/pci/pcie/aer/aerdrv_errprint.c
  total: 0 errors, 10 warnings, 247 lines checked
Signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Reviewed-by: Andrew Patterson <andrew.patterson@hp.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
											
										 
											2009-09-07 17:07:29 +09:00
										 |  |  | 	"Poisoned TLP          ",	/* Bit Position 12	*/ | 
					
						
							| 
									
										
										
										
											2006-07-31 15:21:33 +08:00
										 |  |  | 	"Flow Control Protocol ",	/* Bit Position 13	*/ | 
					
						
							| 
									
										
											  
											
												PCI: pcie, aer: checkpatch style cleanup in pcie/aer/*
Before:
 drivers/pci/pcie/aer/aer_inject.c
  total: 4 errors, 4 warnings, 473 lines checked
 drivers/pci/pcie/aer/aerdrv.c
  total: 5 errors, 2 warnings, 333 lines checked
 drivers/pci/pcie/aer/aerdrv.h
  total: 1 errors, 0 warnings, 139 lines checked
 drivers/pci/pcie/aer/aerdrv_core.c
  total: 4 errors, 3 warnings, 872 lines checked
 drivers/pci/pcie/aer/aerdrv_errprint.c
  total: 12 errors, 11 warnings, 248 lines checked
After:
 drivers/pci/pcie/aer/aer_inject.c
  total: 0 errors, 0 warnings, 466 lines checked
 drivers/pci/pcie/aer/aerdrv.c
  total: 0 errors, 0 warnings, 335 lines checked
 drivers/pci/pcie/aer/aerdrv.h
  total: 0 errors, 0 warnings, 139 lines checked
 drivers/pci/pcie/aer/aerdrv_core.c
  total: 0 errors, 0 warnings, 869 lines checked
 drivers/pci/pcie/aer/aerdrv_errprint.c
  total: 0 errors, 10 warnings, 247 lines checked
Signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Reviewed-by: Andrew Patterson <andrew.patterson@hp.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
											
										 
											2009-09-07 17:07:29 +09:00
										 |  |  | 	"Completion Timeout    ",	/* Bit Position 14	*/ | 
					
						
							|  |  |  | 	"Completer Abort       ",	/* Bit Position 15	*/ | 
					
						
							| 
									
										
										
										
											2006-07-31 15:21:33 +08:00
										 |  |  | 	"Unexpected Completion ",	/* Bit Position 16	*/ | 
					
						
							|  |  |  | 	"Receiver Overflow     ",	/* Bit Position 17	*/ | 
					
						
							|  |  |  | 	"Malformed TLP         ",	/* Bit Position 18	*/ | 
					
						
							|  |  |  | 	"ECRC                  ",	/* Bit Position 19	*/ | 
					
						
							|  |  |  | 	"Unsupported Request   ",	/* Bit Position 20	*/ | 
					
						
							|  |  |  | 	NULL, | 
					
						
							|  |  |  | 	NULL, | 
					
						
							|  |  |  | 	NULL, | 
					
						
							|  |  |  | 	NULL, | 
					
						
							|  |  |  | 	NULL, | 
					
						
							|  |  |  | 	NULL, | 
					
						
							|  |  |  | 	NULL, | 
					
						
							|  |  |  | 	NULL, | 
					
						
							|  |  |  | 	NULL, | 
					
						
							|  |  |  | 	NULL, | 
					
						
							|  |  |  | 	NULL, | 
					
						
							|  |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
											  
											
												PCI: pcie, aer: checkpatch style cleanup in pcie/aer/*
Before:
 drivers/pci/pcie/aer/aer_inject.c
  total: 4 errors, 4 warnings, 473 lines checked
 drivers/pci/pcie/aer/aerdrv.c
  total: 5 errors, 2 warnings, 333 lines checked
 drivers/pci/pcie/aer/aerdrv.h
  total: 1 errors, 0 warnings, 139 lines checked
 drivers/pci/pcie/aer/aerdrv_core.c
  total: 4 errors, 3 warnings, 872 lines checked
 drivers/pci/pcie/aer/aerdrv_errprint.c
  total: 12 errors, 11 warnings, 248 lines checked
After:
 drivers/pci/pcie/aer/aer_inject.c
  total: 0 errors, 0 warnings, 466 lines checked
 drivers/pci/pcie/aer/aerdrv.c
  total: 0 errors, 0 warnings, 335 lines checked
 drivers/pci/pcie/aer/aerdrv.h
  total: 0 errors, 0 warnings, 139 lines checked
 drivers/pci/pcie/aer/aerdrv_core.c
  total: 0 errors, 0 warnings, 869 lines checked
 drivers/pci/pcie/aer/aerdrv_errprint.c
  total: 0 errors, 10 warnings, 247 lines checked
Signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Reviewed-by: Andrew Patterson <andrew.patterson@hp.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
											
										 
											2009-09-07 17:07:29 +09:00
										 |  |  | static char *aer_agent_string[] = { | 
					
						
							| 
									
										
										
										
											2006-07-31 15:21:33 +08:00
										 |  |  | 	"Receiver ID", | 
					
						
							|  |  |  | 	"Requester ID", | 
					
						
							|  |  |  | 	"Completer ID", | 
					
						
							|  |  |  | 	"Transmitter ID" | 
					
						
							|  |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
											  
											
												PCI: pcie, aer: change error print format
Use dev_printk like format.
Sample (real machine + dummy error injected by aer-inject):
- Before:
+------ PCI-Express Device Error ------+
Error Severity          : Corrected
PCIE Bus Error type     : Data Link Layer
Bad TLP                 :
Receiver ID             : 2800
VendorID=8086h, DeviceID=1096h, Bus=28h, Device=00h, Function=00h
+------ PCI-Express Device Error ------+
Error Severity          : Corrected
PCIE Bus Error type     : Data Link Layer
Bad TLP                 :
Bad DLLP                :
Receiver ID             : 2801
VendorID=8086h, DeviceID=1096h, Bus=28h, Device=00h, Function=01h
Error of this Agent(2801) is reported first
- After:
pcieport-driver 0000:00:02.0: AER: Multiple Corrected error received: id=2801
e1000e 0000:28:00.0: PCIE Bus Error: severity=Corrected, type=Data Link Layer, id=2800(Receiver ID)
e1000e 0000:28:00.0:   device [8086:1096] error status/mask=00000040/00000000
e1000e 0000:28:00.0:    [ 6] Bad TLP
e1000e 0000:28:00.1: PCIE Bus Error: severity=Corrected, type=Data Link Layer, id=2801(Receiver ID)
e1000e 0000:28:00.1:   device [8086:1096] error status/mask=000000c0/00000000
e1000e 0000:28:00.1:    [ 6] Bad TLP
e1000e 0000:28:00.1:    [ 7] Bad DLLP
e1000e 0000:28:00.1:   Error of this Agent(2801) is reported first
Signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
											
										 
											2009-09-07 17:16:45 +09:00
										 |  |  | static void __aer_print_error(struct aer_err_info *info, struct pci_dev *dev) | 
					
						
							| 
									
										
										
										
											2006-07-31 15:21:33 +08:00
										 |  |  | { | 
					
						
							| 
									
										
										
										
											2009-09-07 17:12:25 +09:00
										 |  |  | 	int i, status; | 
					
						
							| 
									
										
											  
											
												PCI: pcie, aer: checkpatch style cleanup in pcie/aer/*
Before:
 drivers/pci/pcie/aer/aer_inject.c
  total: 4 errors, 4 warnings, 473 lines checked
 drivers/pci/pcie/aer/aerdrv.c
  total: 5 errors, 2 warnings, 333 lines checked
 drivers/pci/pcie/aer/aerdrv.h
  total: 1 errors, 0 warnings, 139 lines checked
 drivers/pci/pcie/aer/aerdrv_core.c
  total: 4 errors, 3 warnings, 872 lines checked
 drivers/pci/pcie/aer/aerdrv_errprint.c
  total: 12 errors, 11 warnings, 248 lines checked
After:
 drivers/pci/pcie/aer/aer_inject.c
  total: 0 errors, 0 warnings, 466 lines checked
 drivers/pci/pcie/aer/aerdrv.c
  total: 0 errors, 0 warnings, 335 lines checked
 drivers/pci/pcie/aer/aerdrv.h
  total: 0 errors, 0 warnings, 139 lines checked
 drivers/pci/pcie/aer/aerdrv_core.c
  total: 0 errors, 0 warnings, 869 lines checked
 drivers/pci/pcie/aer/aerdrv_errprint.c
  total: 0 errors, 10 warnings, 247 lines checked
Signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Reviewed-by: Andrew Patterson <andrew.patterson@hp.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
											
										 
											2009-09-07 17:07:29 +09:00
										 |  |  | 	char *errmsg = NULL; | 
					
						
							| 
									
										
										
										
											2006-07-31 15:21:33 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-09-07 17:12:25 +09:00
										 |  |  | 	status = (info->status & ~info->mask); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2006-07-31 15:21:33 +08:00
										 |  |  | 	for (i = 0; i < 32; i++) { | 
					
						
							| 
									
										
										
										
											2009-09-07 17:12:25 +09:00
										 |  |  | 		if (!(status & (1 << i))) | 
					
						
							| 
									
										
										
										
											2006-07-31 15:21:33 +08:00
										 |  |  | 			continue; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-09-07 17:11:29 +09:00
										 |  |  | 		if (info->severity == AER_CORRECTABLE) | 
					
						
							| 
									
										
										
										
											2006-07-31 15:21:33 +08:00
										 |  |  | 			errmsg = aer_correctable_error_string[i]; | 
					
						
							|  |  |  | 		else | 
					
						
							|  |  |  | 			errmsg = aer_uncorrectable_error_string[i]; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-09-07 17:11:29 +09:00
										 |  |  | 		if (errmsg) | 
					
						
							| 
									
										
											  
											
												PCI: pcie, aer: change error print format
Use dev_printk like format.
Sample (real machine + dummy error injected by aer-inject):
- Before:
+------ PCI-Express Device Error ------+
Error Severity          : Corrected
PCIE Bus Error type     : Data Link Layer
Bad TLP                 :
Receiver ID             : 2800
VendorID=8086h, DeviceID=1096h, Bus=28h, Device=00h, Function=00h
+------ PCI-Express Device Error ------+
Error Severity          : Corrected
PCIE Bus Error type     : Data Link Layer
Bad TLP                 :
Bad DLLP                :
Receiver ID             : 2801
VendorID=8086h, DeviceID=1096h, Bus=28h, Device=00h, Function=01h
Error of this Agent(2801) is reported first
- After:
pcieport-driver 0000:00:02.0: AER: Multiple Corrected error received: id=2801
e1000e 0000:28:00.0: PCIE Bus Error: severity=Corrected, type=Data Link Layer, id=2800(Receiver ID)
e1000e 0000:28:00.0:   device [8086:1096] error status/mask=00000040/00000000
e1000e 0000:28:00.0:    [ 6] Bad TLP
e1000e 0000:28:00.1: PCIE Bus Error: severity=Corrected, type=Data Link Layer, id=2801(Receiver ID)
e1000e 0000:28:00.1:   device [8086:1096] error status/mask=000000c0/00000000
e1000e 0000:28:00.1:    [ 6] Bad TLP
e1000e 0000:28:00.1:    [ 7] Bad DLLP
e1000e 0000:28:00.1:   Error of this Agent(2801) is reported first
Signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
											
										 
											2009-09-07 17:16:45 +09:00
										 |  |  | 			AER_PR(info, dev, "   [%2d] %s%s\n", i, errmsg, | 
					
						
							|  |  |  | 				info->first_error == i ? " (First)" : ""); | 
					
						
							| 
									
										
										
										
											2009-09-07 17:11:29 +09:00
										 |  |  | 		else | 
					
						
							| 
									
										
											  
											
												PCI: pcie, aer: change error print format
Use dev_printk like format.
Sample (real machine + dummy error injected by aer-inject):
- Before:
+------ PCI-Express Device Error ------+
Error Severity          : Corrected
PCIE Bus Error type     : Data Link Layer
Bad TLP                 :
Receiver ID             : 2800
VendorID=8086h, DeviceID=1096h, Bus=28h, Device=00h, Function=00h
+------ PCI-Express Device Error ------+
Error Severity          : Corrected
PCIE Bus Error type     : Data Link Layer
Bad TLP                 :
Bad DLLP                :
Receiver ID             : 2801
VendorID=8086h, DeviceID=1096h, Bus=28h, Device=00h, Function=01h
Error of this Agent(2801) is reported first
- After:
pcieport-driver 0000:00:02.0: AER: Multiple Corrected error received: id=2801
e1000e 0000:28:00.0: PCIE Bus Error: severity=Corrected, type=Data Link Layer, id=2800(Receiver ID)
e1000e 0000:28:00.0:   device [8086:1096] error status/mask=00000040/00000000
e1000e 0000:28:00.0:    [ 6] Bad TLP
e1000e 0000:28:00.1: PCIE Bus Error: severity=Corrected, type=Data Link Layer, id=2801(Receiver ID)
e1000e 0000:28:00.1:   device [8086:1096] error status/mask=000000c0/00000000
e1000e 0000:28:00.1:    [ 6] Bad TLP
e1000e 0000:28:00.1:    [ 7] Bad DLLP
e1000e 0000:28:00.1:   Error of this Agent(2801) is reported first
Signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
											
										 
											2009-09-07 17:16:45 +09:00
										 |  |  | 			AER_PR(info, dev, "   [%2d] Unknown Error Bit%s\n", i, | 
					
						
							|  |  |  | 				info->first_error == i ? " (First)" : ""); | 
					
						
							| 
									
										
										
										
											2006-07-31 15:21:33 +08:00
										 |  |  | 	} | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | void aer_print_error(struct pci_dev *dev, struct aer_err_info *info) | 
					
						
							|  |  |  | { | 
					
						
							| 
									
										
										
										
											2009-09-07 17:10:40 +09:00
										 |  |  | 	int id = ((dev->bus->number << 8) | dev->devfn); | 
					
						
							| 
									
										
										
										
											2006-07-31 15:21:33 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
											  
											
												PCI: pcie, aer: checkpatch style cleanup in pcie/aer/*
Before:
 drivers/pci/pcie/aer/aer_inject.c
  total: 4 errors, 4 warnings, 473 lines checked
 drivers/pci/pcie/aer/aerdrv.c
  total: 5 errors, 2 warnings, 333 lines checked
 drivers/pci/pcie/aer/aerdrv.h
  total: 1 errors, 0 warnings, 139 lines checked
 drivers/pci/pcie/aer/aerdrv_core.c
  total: 4 errors, 3 warnings, 872 lines checked
 drivers/pci/pcie/aer/aerdrv_errprint.c
  total: 12 errors, 11 warnings, 248 lines checked
After:
 drivers/pci/pcie/aer/aer_inject.c
  total: 0 errors, 0 warnings, 466 lines checked
 drivers/pci/pcie/aer/aerdrv.c
  total: 0 errors, 0 warnings, 335 lines checked
 drivers/pci/pcie/aer/aerdrv.h
  total: 0 errors, 0 warnings, 139 lines checked
 drivers/pci/pcie/aer/aerdrv_core.c
  total: 0 errors, 0 warnings, 869 lines checked
 drivers/pci/pcie/aer/aerdrv_errprint.c
  total: 0 errors, 10 warnings, 247 lines checked
Signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Reviewed-by: Andrew Patterson <andrew.patterson@hp.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
											
										 
											2009-09-07 17:07:29 +09:00
										 |  |  | 	if (info->status == 0) { | 
					
						
							| 
									
										
											  
											
												PCI: pcie, aer: change error print format
Use dev_printk like format.
Sample (real machine + dummy error injected by aer-inject):
- Before:
+------ PCI-Express Device Error ------+
Error Severity          : Corrected
PCIE Bus Error type     : Data Link Layer
Bad TLP                 :
Receiver ID             : 2800
VendorID=8086h, DeviceID=1096h, Bus=28h, Device=00h, Function=00h
+------ PCI-Express Device Error ------+
Error Severity          : Corrected
PCIE Bus Error type     : Data Link Layer
Bad TLP                 :
Bad DLLP                :
Receiver ID             : 2801
VendorID=8086h, DeviceID=1096h, Bus=28h, Device=00h, Function=01h
Error of this Agent(2801) is reported first
- After:
pcieport-driver 0000:00:02.0: AER: Multiple Corrected error received: id=2801
e1000e 0000:28:00.0: PCIE Bus Error: severity=Corrected, type=Data Link Layer, id=2800(Receiver ID)
e1000e 0000:28:00.0:   device [8086:1096] error status/mask=00000040/00000000
e1000e 0000:28:00.0:    [ 6] Bad TLP
e1000e 0000:28:00.1: PCIE Bus Error: severity=Corrected, type=Data Link Layer, id=2801(Receiver ID)
e1000e 0000:28:00.1:   device [8086:1096] error status/mask=000000c0/00000000
e1000e 0000:28:00.1:    [ 6] Bad TLP
e1000e 0000:28:00.1:    [ 7] Bad DLLP
e1000e 0000:28:00.1:   Error of this Agent(2801) is reported first
Signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
											
										 
											2009-09-07 17:16:45 +09:00
										 |  |  | 		AER_PR(info, dev, | 
					
						
							| 
									
										
										
										
											2009-12-03 18:00:10 +01:00
										 |  |  | 			"PCIe Bus Error: severity=%s, type=Unaccessible, " | 
					
						
							| 
									
										
											  
											
												PCI: pcie, aer: change error print format
Use dev_printk like format.
Sample (real machine + dummy error injected by aer-inject):
- Before:
+------ PCI-Express Device Error ------+
Error Severity          : Corrected
PCIE Bus Error type     : Data Link Layer
Bad TLP                 :
Receiver ID             : 2800
VendorID=8086h, DeviceID=1096h, Bus=28h, Device=00h, Function=00h
+------ PCI-Express Device Error ------+
Error Severity          : Corrected
PCIE Bus Error type     : Data Link Layer
Bad TLP                 :
Bad DLLP                :
Receiver ID             : 2801
VendorID=8086h, DeviceID=1096h, Bus=28h, Device=00h, Function=01h
Error of this Agent(2801) is reported first
- After:
pcieport-driver 0000:00:02.0: AER: Multiple Corrected error received: id=2801
e1000e 0000:28:00.0: PCIE Bus Error: severity=Corrected, type=Data Link Layer, id=2800(Receiver ID)
e1000e 0000:28:00.0:   device [8086:1096] error status/mask=00000040/00000000
e1000e 0000:28:00.0:    [ 6] Bad TLP
e1000e 0000:28:00.1: PCIE Bus Error: severity=Corrected, type=Data Link Layer, id=2801(Receiver ID)
e1000e 0000:28:00.1:   device [8086:1096] error status/mask=000000c0/00000000
e1000e 0000:28:00.1:    [ 6] Bad TLP
e1000e 0000:28:00.1:    [ 7] Bad DLLP
e1000e 0000:28:00.1:   Error of this Agent(2801) is reported first
Signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
											
										 
											2009-09-07 17:16:45 +09:00
										 |  |  | 			"id=%04x(Unregistered Agent ID)\n", | 
					
						
							|  |  |  | 			aer_error_severity_string[info->severity], id); | 
					
						
							| 
									
										
										
										
											2006-07-31 15:21:33 +08:00
										 |  |  | 	} else { | 
					
						
							| 
									
										
											  
											
												PCI: pcie, aer: change error print format
Use dev_printk like format.
Sample (real machine + dummy error injected by aer-inject):
- Before:
+------ PCI-Express Device Error ------+
Error Severity          : Corrected
PCIE Bus Error type     : Data Link Layer
Bad TLP                 :
Receiver ID             : 2800
VendorID=8086h, DeviceID=1096h, Bus=28h, Device=00h, Function=00h
+------ PCI-Express Device Error ------+
Error Severity          : Corrected
PCIE Bus Error type     : Data Link Layer
Bad TLP                 :
Bad DLLP                :
Receiver ID             : 2801
VendorID=8086h, DeviceID=1096h, Bus=28h, Device=00h, Function=01h
Error of this Agent(2801) is reported first
- After:
pcieport-driver 0000:00:02.0: AER: Multiple Corrected error received: id=2801
e1000e 0000:28:00.0: PCIE Bus Error: severity=Corrected, type=Data Link Layer, id=2800(Receiver ID)
e1000e 0000:28:00.0:   device [8086:1096] error status/mask=00000040/00000000
e1000e 0000:28:00.0:    [ 6] Bad TLP
e1000e 0000:28:00.1: PCIE Bus Error: severity=Corrected, type=Data Link Layer, id=2801(Receiver ID)
e1000e 0000:28:00.1:   device [8086:1096] error status/mask=000000c0/00000000
e1000e 0000:28:00.1:    [ 6] Bad TLP
e1000e 0000:28:00.1:    [ 7] Bad DLLP
e1000e 0000:28:00.1:   Error of this Agent(2801) is reported first
Signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
											
										 
											2009-09-07 17:16:45 +09:00
										 |  |  | 		int layer, agent; | 
					
						
							| 
									
										
										
										
											2006-07-31 15:21:33 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
											  
											
												PCI: pcie, aer: change error print format
Use dev_printk like format.
Sample (real machine + dummy error injected by aer-inject):
- Before:
+------ PCI-Express Device Error ------+
Error Severity          : Corrected
PCIE Bus Error type     : Data Link Layer
Bad TLP                 :
Receiver ID             : 2800
VendorID=8086h, DeviceID=1096h, Bus=28h, Device=00h, Function=00h
+------ PCI-Express Device Error ------+
Error Severity          : Corrected
PCIE Bus Error type     : Data Link Layer
Bad TLP                 :
Bad DLLP                :
Receiver ID             : 2801
VendorID=8086h, DeviceID=1096h, Bus=28h, Device=00h, Function=01h
Error of this Agent(2801) is reported first
- After:
pcieport-driver 0000:00:02.0: AER: Multiple Corrected error received: id=2801
e1000e 0000:28:00.0: PCIE Bus Error: severity=Corrected, type=Data Link Layer, id=2800(Receiver ID)
e1000e 0000:28:00.0:   device [8086:1096] error status/mask=00000040/00000000
e1000e 0000:28:00.0:    [ 6] Bad TLP
e1000e 0000:28:00.1: PCIE Bus Error: severity=Corrected, type=Data Link Layer, id=2801(Receiver ID)
e1000e 0000:28:00.1:   device [8086:1096] error status/mask=000000c0/00000000
e1000e 0000:28:00.1:    [ 6] Bad TLP
e1000e 0000:28:00.1:    [ 7] Bad DLLP
e1000e 0000:28:00.1:   Error of this Agent(2801) is reported first
Signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
											
										 
											2009-09-07 17:16:45 +09:00
										 |  |  | 		layer = AER_GET_LAYER_ERROR(info->severity, info->status); | 
					
						
							| 
									
										
										
										
											2006-07-31 15:21:33 +08:00
										 |  |  | 		agent = AER_GET_AGENT(info->severity, info->status); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
											  
											
												PCI: pcie, aer: change error print format
Use dev_printk like format.
Sample (real machine + dummy error injected by aer-inject):
- Before:
+------ PCI-Express Device Error ------+
Error Severity          : Corrected
PCIE Bus Error type     : Data Link Layer
Bad TLP                 :
Receiver ID             : 2800
VendorID=8086h, DeviceID=1096h, Bus=28h, Device=00h, Function=00h
+------ PCI-Express Device Error ------+
Error Severity          : Corrected
PCIE Bus Error type     : Data Link Layer
Bad TLP                 :
Bad DLLP                :
Receiver ID             : 2801
VendorID=8086h, DeviceID=1096h, Bus=28h, Device=00h, Function=01h
Error of this Agent(2801) is reported first
- After:
pcieport-driver 0000:00:02.0: AER: Multiple Corrected error received: id=2801
e1000e 0000:28:00.0: PCIE Bus Error: severity=Corrected, type=Data Link Layer, id=2800(Receiver ID)
e1000e 0000:28:00.0:   device [8086:1096] error status/mask=00000040/00000000
e1000e 0000:28:00.0:    [ 6] Bad TLP
e1000e 0000:28:00.1: PCIE Bus Error: severity=Corrected, type=Data Link Layer, id=2801(Receiver ID)
e1000e 0000:28:00.1:   device [8086:1096] error status/mask=000000c0/00000000
e1000e 0000:28:00.1:    [ 6] Bad TLP
e1000e 0000:28:00.1:    [ 7] Bad DLLP
e1000e 0000:28:00.1:   Error of this Agent(2801) is reported first
Signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
											
										 
											2009-09-07 17:16:45 +09:00
										 |  |  | 		AER_PR(info, dev, | 
					
						
							| 
									
										
										
										
											2009-12-03 18:00:10 +01:00
										 |  |  | 			"PCIe Bus Error: severity=%s, type=%s, id=%04x(%s)\n", | 
					
						
							| 
									
										
											  
											
												PCI: pcie, aer: change error print format
Use dev_printk like format.
Sample (real machine + dummy error injected by aer-inject):
- Before:
+------ PCI-Express Device Error ------+
Error Severity          : Corrected
PCIE Bus Error type     : Data Link Layer
Bad TLP                 :
Receiver ID             : 2800
VendorID=8086h, DeviceID=1096h, Bus=28h, Device=00h, Function=00h
+------ PCI-Express Device Error ------+
Error Severity          : Corrected
PCIE Bus Error type     : Data Link Layer
Bad TLP                 :
Bad DLLP                :
Receiver ID             : 2801
VendorID=8086h, DeviceID=1096h, Bus=28h, Device=00h, Function=01h
Error of this Agent(2801) is reported first
- After:
pcieport-driver 0000:00:02.0: AER: Multiple Corrected error received: id=2801
e1000e 0000:28:00.0: PCIE Bus Error: severity=Corrected, type=Data Link Layer, id=2800(Receiver ID)
e1000e 0000:28:00.0:   device [8086:1096] error status/mask=00000040/00000000
e1000e 0000:28:00.0:    [ 6] Bad TLP
e1000e 0000:28:00.1: PCIE Bus Error: severity=Corrected, type=Data Link Layer, id=2801(Receiver ID)
e1000e 0000:28:00.1:   device [8086:1096] error status/mask=000000c0/00000000
e1000e 0000:28:00.1:    [ 6] Bad TLP
e1000e 0000:28:00.1:    [ 7] Bad DLLP
e1000e 0000:28:00.1:   Error of this Agent(2801) is reported first
Signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
											
										 
											2009-09-07 17:16:45 +09:00
										 |  |  | 			aer_error_severity_string[info->severity], | 
					
						
							|  |  |  | 			aer_error_layer[layer], id, aer_agent_string[agent]); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 		AER_PR(info, dev, | 
					
						
							|  |  |  | 			"  device [%04x:%04x] error status/mask=%08x/%08x\n", | 
					
						
							|  |  |  | 			dev->vendor, dev->device, info->status, info->mask); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 		__aer_print_error(info, dev); | 
					
						
							| 
									
										
										
										
											2006-07-31 15:21:33 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-09-07 17:16:20 +09:00
										 |  |  | 		if (info->tlp_header_valid) { | 
					
						
							| 
									
										
										
										
											2006-07-31 15:21:33 +08:00
										 |  |  | 			unsigned char *tlp = (unsigned char *) &info->tlp; | 
					
						
							| 
									
										
											  
											
												PCI: pcie, aer: change error print format
Use dev_printk like format.
Sample (real machine + dummy error injected by aer-inject):
- Before:
+------ PCI-Express Device Error ------+
Error Severity          : Corrected
PCIE Bus Error type     : Data Link Layer
Bad TLP                 :
Receiver ID             : 2800
VendorID=8086h, DeviceID=1096h, Bus=28h, Device=00h, Function=00h
+------ PCI-Express Device Error ------+
Error Severity          : Corrected
PCIE Bus Error type     : Data Link Layer
Bad TLP                 :
Bad DLLP                :
Receiver ID             : 2801
VendorID=8086h, DeviceID=1096h, Bus=28h, Device=00h, Function=01h
Error of this Agent(2801) is reported first
- After:
pcieport-driver 0000:00:02.0: AER: Multiple Corrected error received: id=2801
e1000e 0000:28:00.0: PCIE Bus Error: severity=Corrected, type=Data Link Layer, id=2800(Receiver ID)
e1000e 0000:28:00.0:   device [8086:1096] error status/mask=00000040/00000000
e1000e 0000:28:00.0:    [ 6] Bad TLP
e1000e 0000:28:00.1: PCIE Bus Error: severity=Corrected, type=Data Link Layer, id=2801(Receiver ID)
e1000e 0000:28:00.1:   device [8086:1096] error status/mask=000000c0/00000000
e1000e 0000:28:00.1:    [ 6] Bad TLP
e1000e 0000:28:00.1:    [ 7] Bad DLLP
e1000e 0000:28:00.1:   Error of this Agent(2801) is reported first
Signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
											
										 
											2009-09-07 17:16:45 +09:00
										 |  |  | 			AER_PR(info, dev, "  TLP Header:" | 
					
						
							|  |  |  | 				" %02x%02x%02x%02x %02x%02x%02x%02x" | 
					
						
							| 
									
										
										
										
											2006-07-31 15:21:33 +08:00
										 |  |  | 				" %02x%02x%02x%02x %02x%02x%02x%02x\n", | 
					
						
							|  |  |  | 				*(tlp + 3), *(tlp + 2), *(tlp + 1), *tlp, | 
					
						
							|  |  |  | 				*(tlp + 7), *(tlp + 6), *(tlp + 5), *(tlp + 4), | 
					
						
							|  |  |  | 				*(tlp + 11), *(tlp + 10), *(tlp + 9), | 
					
						
							|  |  |  | 				*(tlp + 8), *(tlp + 15), *(tlp + 14), | 
					
						
							|  |  |  | 				*(tlp + 13), *(tlp + 12)); | 
					
						
							|  |  |  | 		} | 
					
						
							|  |  |  | 	} | 
					
						
							| 
									
										
										
										
											2009-09-07 17:10:40 +09:00
										 |  |  | 
 | 
					
						
							|  |  |  | 	if (info->id && info->error_dev_num > 1 && info->id == id) | 
					
						
							| 
									
										
											  
											
												PCI: pcie, aer: change error print format
Use dev_printk like format.
Sample (real machine + dummy error injected by aer-inject):
- Before:
+------ PCI-Express Device Error ------+
Error Severity          : Corrected
PCIE Bus Error type     : Data Link Layer
Bad TLP                 :
Receiver ID             : 2800
VendorID=8086h, DeviceID=1096h, Bus=28h, Device=00h, Function=00h
+------ PCI-Express Device Error ------+
Error Severity          : Corrected
PCIE Bus Error type     : Data Link Layer
Bad TLP                 :
Bad DLLP                :
Receiver ID             : 2801
VendorID=8086h, DeviceID=1096h, Bus=28h, Device=00h, Function=01h
Error of this Agent(2801) is reported first
- After:
pcieport-driver 0000:00:02.0: AER: Multiple Corrected error received: id=2801
e1000e 0000:28:00.0: PCIE Bus Error: severity=Corrected, type=Data Link Layer, id=2800(Receiver ID)
e1000e 0000:28:00.0:   device [8086:1096] error status/mask=00000040/00000000
e1000e 0000:28:00.0:    [ 6] Bad TLP
e1000e 0000:28:00.1: PCIE Bus Error: severity=Corrected, type=Data Link Layer, id=2801(Receiver ID)
e1000e 0000:28:00.1:   device [8086:1096] error status/mask=000000c0/00000000
e1000e 0000:28:00.1:    [ 6] Bad TLP
e1000e 0000:28:00.1:    [ 7] Bad DLLP
e1000e 0000:28:00.1:   Error of this Agent(2801) is reported first
Signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
											
										 
											2009-09-07 17:16:45 +09:00
										 |  |  | 		AER_PR(info, dev, | 
					
						
							|  |  |  | 			"  Error of this Agent(%04x) is reported first\n", id); | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | void aer_print_port_info(struct pci_dev *dev, struct aer_err_info *info) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  | 	dev_info(&dev->dev, "AER: %s%s error received: id=%04x\n", | 
					
						
							|  |  |  | 		info->multi_error_valid ? "Multiple " : "", | 
					
						
							|  |  |  | 		aer_error_severity_string[info->severity], info->id); | 
					
						
							| 
									
										
										
										
											2006-07-31 15:21:33 +08:00
										 |  |  | } |