@@ -96,6 +96,11 @@ static int mlx5_health_get_rfr(u8 rfr_severity)
9696 return rfr_severity >> MLX5_RFR_BIT_OFFSET ;
9797}
9898
99+ static int mlx5_health_get_crr (u8 rfr_severity )
100+ {
101+ return (rfr_severity >> MLX5_CRR_BIT_OFFSET ) & 0x01 ;
102+ }
103+
99104static bool sensor_fw_synd_rfr (struct mlx5_core_dev * dev )
100105{
101106 struct mlx5_core_health * health = & dev -> priv .health ;
@@ -375,6 +380,8 @@ static const char *hsynd_str(u8 synd)
375380 return "High temperature" ;
376381 case MLX5_INITIAL_SEG_HEALTH_SYNDROME_ICM_PCI_POISONED_ERR :
377382 return "ICM fetch PCI data poisoned error" ;
383+ case MLX5_INITIAL_SEG_HEALTH_SYNDROME_TRUST_LOCKDOWN_ERR :
384+ return "Trust lockdown error" ;
378385 default :
379386 return "unrecognized error" ;
380387 }
@@ -442,12 +449,15 @@ static void print_health_info(struct mlx5_core_dev *dev)
442449 mlx5_log (dev , severity , "time %u\n" , ioread32be (& h -> time ));
443450 mlx5_log (dev , severity , "hw_id 0x%08x\n" , ioread32be (& h -> hw_id ));
444451 mlx5_log (dev , severity , "rfr %d\n" , mlx5_health_get_rfr (rfr_severity ));
452+ mlx5_log (dev , severity , "crr %d\n" , mlx5_health_get_crr (rfr_severity ));
445453 mlx5_log (dev , severity , "severity %d (%s)\n" , severity , mlx5_loglevel_str (severity ));
446454 mlx5_log (dev , severity , "irisc_index %d\n" , ioread8 (& h -> irisc_index ));
447455 mlx5_log (dev , severity , "synd 0x%x: %s\n" , ioread8 (& h -> synd ),
448456 hsynd_str (ioread8 (& h -> synd )));
449457 mlx5_log (dev , severity , "ext_synd 0x%04x\n" , ioread16be (& h -> ext_synd ));
450458 mlx5_log (dev , severity , "raw fw_ver 0x%08x\n" , ioread32be (& h -> fw_ver ));
459+ if (mlx5_health_get_crr (rfr_severity ))
460+ mlx5_core_warn (dev , "Cold reset is required\n" );
451461}
452462
453463static int
@@ -799,14 +809,17 @@ static void poll_health(struct timer_list *t)
799809 health -> prev = count ;
800810 if (health -> miss_counter == MAX_MISSES ) {
801811 mlx5_core_err (dev , "device's health compromised - reached miss count\n" );
812+ health -> synd = ioread8 (& h -> synd );
802813 print_health_info (dev );
803814 queue_work (health -> wq , & health -> report_work );
804815 }
805816
806817 prev_synd = health -> synd ;
807818 health -> synd = ioread8 (& h -> synd );
808- if (health -> synd && health -> synd != prev_synd )
819+ if (health -> synd && health -> synd != prev_synd ) {
820+ print_health_info (dev );
809821 queue_work (health -> wq , & health -> report_work );
822+ }
810823
811824out :
812825 mod_timer (& health -> timer , get_next_poll_jiffies (dev ));
0 commit comments