@@ -56,6 +56,22 @@ const char *const port_state_str[] = {
56
56
[FCS_ONLINE ] = "ONLINE"
57
57
};
58
58
59
+ #define SFP_DISABLE_LASER_INITIATED 0x15 /* Sub code of 8070 AEN */
60
+ #define SFP_ENABLE_LASER_INITIATED 0x16 /* Sub code of 8070 AEN */
61
+
62
+ static inline void display_Laser_info (scsi_qla_host_t * vha ,
63
+ u16 mb1 , u16 mb2 , u16 mb3 ) {
64
+
65
+ if (mb1 == SFP_DISABLE_LASER_INITIATED )
66
+ ql_log (ql_log_warn , vha , 0xf0a2 ,
67
+ "SFP temperature (%d C) reached/exceeded the threshold (%d C). Laser is disabled.\n" ,
68
+ mb3 , mb2 );
69
+ if (mb1 == SFP_ENABLE_LASER_INITIATED )
70
+ ql_log (ql_log_warn , vha , 0xf0a3 ,
71
+ "SFP temperature (%d C) reached normal operating level. Laser is enabled.\n" ,
72
+ mb3 );
73
+ }
74
+
59
75
static void
60
76
qla24xx_process_abts (struct scsi_qla_host * vha , struct purex_item * pkt )
61
77
{
@@ -1927,6 +1943,8 @@ qla2x00_async_event(scsi_qla_host_t *vha, struct rsp_que *rsp, uint16_t *mb)
1927
1943
break ;
1928
1944
1929
1945
case MBA_TEMPERATURE_ALERT :
1946
+ if (IS_QLA27XX (ha ) || IS_QLA28XX (ha ))
1947
+ display_Laser_info (vha , mb [1 ], mb [2 ], mb [3 ]);
1930
1948
ql_dbg (ql_dbg_async , vha , 0x505e ,
1931
1949
"TEMPERATURE ALERT: %04x %04x %04x\n" , mb [1 ], mb [2 ], mb [3 ]);
1932
1950
break ;
0 commit comments