@@ -664,12 +664,6 @@ static void pci_rootport_aer_stats_incr(struct pci_dev *pdev,
664
664
}
665
665
}
666
666
667
- static void __print_tlp_header (struct pci_dev * dev , struct pcie_tlp_log * t )
668
- {
669
- pci_err (dev , " TLP Header: %08x %08x %08x %08x\n" ,
670
- t -> dw [0 ], t -> dw [1 ], t -> dw [2 ], t -> dw [3 ]);
671
- }
672
-
673
667
static void __aer_print_error (struct pci_dev * dev ,
674
668
struct aer_err_info * info )
675
669
{
@@ -691,8 +685,8 @@ static void __aer_print_error(struct pci_dev *dev,
691
685
if (!errmsg )
692
686
errmsg = "Unknown Error Bit" ;
693
687
694
- pci_printk (level , dev , " [%2d] %-22s%s\n" , i , errmsg ,
695
- info -> first_error == i ? " (First)" : "" );
688
+ pci_printk (level , dev , "%s [%2d] %-22s%s\n" , dev_fmt ( "" ), i ,
689
+ errmsg , info -> first_error == i ? " (First)" : "" );
696
690
}
697
691
pci_dev_aer_stats_incr (dev , info );
698
692
}
@@ -714,17 +708,17 @@ void aer_print_error(struct pci_dev *dev, struct aer_err_info *info)
714
708
715
709
level = (info -> severity == AER_CORRECTABLE ) ? KERN_WARNING : KERN_ERR ;
716
710
717
- pci_printk (level , dev , "PCIe Bus Error: severity=%s, type=%s, (%s)\n" ,
718
- aer_error_severity_string [info -> severity ],
711
+ pci_printk (level , dev , "%sPCIe Bus Error: severity=%s, type=%s, (%s)\n" ,
712
+ dev_fmt ( "" ), aer_error_severity_string [info -> severity ],
719
713
aer_error_layer [layer ], aer_agent_string [agent ]);
720
714
721
- pci_printk (level , dev , " device [%04x:%04x] error status/mask=%08x/%08x\n" ,
722
- dev -> vendor , dev -> device , info -> status , info -> mask );
715
+ pci_printk (level , dev , "%s device [%04x:%04x] error status/mask=%08x/%08x\n" ,
716
+ dev_fmt ( "" ), dev -> vendor , dev -> device , info -> status , info -> mask );
723
717
724
718
__aer_print_error (dev , info );
725
719
726
720
if (info -> tlp_header_valid )
727
- __print_tlp_header (dev , & info -> tlp );
721
+ pcie_print_tlp_log (dev , & info -> tlp , dev_fmt ( " " ) );
728
722
729
723
out :
730
724
if (info -> id && info -> error_dev_num > 1 && info -> id == id )
@@ -796,7 +790,7 @@ void pci_print_aer(struct pci_dev *dev, int aer_severity,
796
790
aer -> uncor_severity );
797
791
798
792
if (tlp_header_valid )
799
- __print_tlp_header (dev , & aer -> header_log );
793
+ pcie_print_tlp_log (dev , & aer -> header_log , dev_fmt ( " " ) );
800
794
801
795
trace_aer_event (dev_name (& dev -> dev ), (status & ~mask ),
802
796
aer_severity , tlp_header_valid , & aer -> header_log );
@@ -1245,7 +1239,9 @@ int aer_get_device_error_info(struct pci_dev *dev, struct aer_err_info *info)
1245
1239
1246
1240
if (info -> status & AER_LOG_TLP_MASKS ) {
1247
1241
info -> tlp_header_valid = 1 ;
1248
- pcie_read_tlp_log (dev , aer + PCI_ERR_HEADER_LOG , & info -> tlp );
1242
+ pcie_read_tlp_log (dev , aer + PCI_ERR_HEADER_LOG ,
1243
+ aer + PCI_ERR_PREFIX_LOG ,
1244
+ aer_tlp_log_len (dev ), & info -> tlp );
1249
1245
}
1250
1246
}
1251
1247
0 commit comments