File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -3997,6 +3997,22 @@ void qedf_stag_change_work(struct work_struct *work)
3997
3997
struct qedf_ctx * qedf =
3998
3998
container_of (work , struct qedf_ctx , stag_work .work );
3999
3999
4000
+ if (!qedf ) {
4001
+ QEDF_ERR (& qedf -> dbg_ctx , "qedf is NULL" );
4002
+ return ;
4003
+ }
4004
+
4005
+ if (test_bit (QEDF_IN_RECOVERY , & qedf -> flags )) {
4006
+ QEDF_ERR (& qedf -> dbg_ctx ,
4007
+ "Already is in recovery, hence not calling software context reset.\n" );
4008
+ return ;
4009
+ }
4010
+
4011
+ if (test_bit (QEDF_UNLOADING , & qedf -> flags )) {
4012
+ QEDF_ERR (& qedf -> dbg_ctx , "Driver unloading\n" );
4013
+ return ;
4014
+ }
4015
+
4000
4016
printk_ratelimited ("[%s]:[%s:%d]:%d: Performing software context reset." ,
4001
4017
dev_name (& qedf -> pdev -> dev ), __func__ , __LINE__ ,
4002
4018
qedf -> dbg_ctx .host_no );
You can’t perform that action at this time.
0 commit comments