@@ -673,20 +673,23 @@ static void __aer_print_error(struct pci_dev *dev,
673
673
{
674
674
const char * * strings ;
675
675
unsigned long status = info -> status & ~info -> mask ;
676
- const char * errmsg ;
676
+ const char * level , * errmsg ;
677
677
int i ;
678
678
679
- if (info -> severity == AER_CORRECTABLE )
679
+ if (info -> severity == AER_CORRECTABLE ) {
680
680
strings = aer_correctable_error_string ;
681
- else
681
+ level = KERN_WARNING ;
682
+ } else {
682
683
strings = aer_uncorrectable_error_string ;
684
+ level = KERN_ERR ;
685
+ }
683
686
684
687
for_each_set_bit (i , & status , 32 ) {
685
688
errmsg = strings [i ];
686
689
if (!errmsg )
687
690
errmsg = "Unknown Error Bit" ;
688
691
689
- pci_err ( dev , " [%2d] %-22s%s\n" , i , errmsg ,
692
+ pci_printk ( level , dev , " [%2d] %-22s%s\n" , i , errmsg ,
690
693
info -> first_error == i ? " (First)" : "" );
691
694
}
692
695
pci_dev_aer_stats_incr (dev , info );
@@ -696,6 +699,7 @@ void aer_print_error(struct pci_dev *dev, struct aer_err_info *info)
696
699
{
697
700
int layer , agent ;
698
701
int id = ((dev -> bus -> number << 8 ) | dev -> devfn );
702
+ const char * level ;
699
703
700
704
if (!info -> status ) {
701
705
pci_err (dev , "PCIe Bus Error: severity=%s, type=Inaccessible, (Unregistered Agent ID)\n" ,
@@ -706,13 +710,14 @@ void aer_print_error(struct pci_dev *dev, struct aer_err_info *info)
706
710
layer = AER_GET_LAYER_ERROR (info -> severity , info -> status );
707
711
agent = AER_GET_AGENT (info -> severity , info -> status );
708
712
709
- pci_err (dev , "PCIe Bus Error: severity=%s, type=%s, (%s)\n" ,
710
- aer_error_severity_string [info -> severity ],
711
- aer_error_layer [layer ], aer_agent_string [agent ]);
713
+ level = (info -> severity == AER_CORRECTABLE ) ? KERN_WARNING : KERN_ERR ;
714
+
715
+ pci_printk (level , dev , "PCIe Bus Error: severity=%s, type=%s, (%s)\n" ,
716
+ aer_error_severity_string [info -> severity ],
717
+ aer_error_layer [layer ], aer_agent_string [agent ]);
712
718
713
- pci_err (dev , " device [%04x:%04x] error status/mask=%08x/%08x\n" ,
714
- dev -> vendor , dev -> device ,
715
- info -> status , info -> mask );
719
+ pci_printk (level , dev , " device [%04x:%04x] error status/mask=%08x/%08x\n" ,
720
+ dev -> vendor , dev -> device , info -> status , info -> mask );
716
721
717
722
__aer_print_error (dev , info );
718
723
0 commit comments