@@ -239,8 +239,16 @@ static int qla_nvme_ls_req(struct nvme_fc_local_port *lport,
239
239
struct qla_hw_data * ha ;
240
240
srb_t * sp ;
241
241
242
+
243
+ if (!fcport || (fcport && fcport -> deleted ))
244
+ return rval ;
245
+
242
246
vha = fcport -> vha ;
243
247
ha = vha -> hw ;
248
+
249
+ if (!ha -> flags .fw_started )
250
+ return rval ;
251
+
244
252
/* Alloc SRB structure */
245
253
sp = qla2x00_get_sp (vha , fcport , GFP_ATOMIC );
246
254
if (!sp )
@@ -272,6 +280,7 @@ static int qla_nvme_ls_req(struct nvme_fc_local_port *lport,
272
280
"qla2x00_start_sp failed = %d\n" , rval );
273
281
atomic_dec (& sp -> ref_count );
274
282
wake_up (& sp -> nvme_ls_waitq );
283
+ sp -> free (sp );
275
284
return rval ;
276
285
}
277
286
@@ -486,11 +495,11 @@ static int qla_nvme_post_cmd(struct nvme_fc_local_port *lport,
486
495
487
496
fcport = qla_rport -> fcport ;
488
497
489
- vha = fcport -> vha ;
490
-
491
- if (test_bit (ABORT_ISP_ACTIVE , & vha -> dpc_flags ))
498
+ if (!qpair || !fcport || (qpair && !qpair -> fw_started ) ||
499
+ (fcport && fcport -> deleted ))
492
500
return rval ;
493
501
502
+ vha = fcport -> vha ;
494
503
/*
495
504
* If we know the dev is going away while the transport is still sending
496
505
* IO's return busy back to stall the IO Q. This happens when the
@@ -523,6 +532,7 @@ static int qla_nvme_post_cmd(struct nvme_fc_local_port *lport,
523
532
"qla2x00_start_nvme_mq failed = %d\n" , rval );
524
533
atomic_dec (& sp -> ref_count );
525
534
wake_up (& sp -> nvme_ls_waitq );
535
+ sp -> free (sp );
526
536
}
527
537
528
538
return rval ;
@@ -549,14 +559,13 @@ static void qla_nvme_remoteport_delete(struct nvme_fc_remote_port *rport)
549
559
550
560
complete (& fcport -> nvme_del_done );
551
561
552
- if (!test_bit (UNLOADING , & fcport -> vha -> dpc_flags )) {
553
- INIT_WORK (& fcport -> free_work , qlt_free_session_done );
554
- schedule_work (& fcport -> free_work );
555
- }
562
+ INIT_WORK (& fcport -> free_work , qlt_free_session_done );
563
+ schedule_work (& fcport -> free_work );
556
564
557
565
fcport -> nvme_flag &= ~NVME_FLAG_DELETING ;
558
566
ql_log (ql_log_info , fcport -> vha , 0x2110 ,
559
- "remoteport_delete of %p completed.\n" , fcport );
567
+ "remoteport_delete of %p %8phN completed.\n" ,
568
+ fcport , fcport -> port_name );
560
569
}
561
570
562
571
static struct nvme_fc_port_template qla_nvme_fc_transport = {
@@ -588,7 +597,8 @@ static void qla_nvme_unregister_remote_port(struct work_struct *work)
588
597
return ;
589
598
590
599
ql_log (ql_log_warn , NULL , 0x2112 ,
591
- "%s: unregister remoteport on %p\n" ,__func__ , fcport );
600
+ "%s: unregister remoteport on %p %8phN\n" ,
601
+ __func__ , fcport , fcport -> port_name );
592
602
593
603
nvme_fc_set_remoteport_devloss (fcport -> nvme_remote_port , 0 );
594
604
init_completion (& fcport -> nvme_del_done );
0 commit comments