@@ -181,24 +181,32 @@ static void qla_nvme_sp_done(void *ptr, int res)
181181 return ;
182182}
183183
184- static void qla_nvme_ls_abort (struct nvme_fc_local_port * lport ,
185- struct nvme_fc_remote_port * rport , struct nvmefc_ls_req * fd )
184+ static void qla_nvme_abort_work (struct work_struct * work )
186185{
187- struct nvme_private * priv = fd -> private ;
188- struct qla_nvme_rport * qla_rport = rport -> private ;
189- fc_port_t * fcport = qla_rport -> fcport ;
186+ struct nvme_private * priv =
187+ container_of (work , struct nvme_private , abort_work );
190188 srb_t * sp = priv -> sp ;
191- int rval ;
189+ fc_port_t * fcport = sp -> fcport ;
192190 struct qla_hw_data * ha = fcport -> vha -> hw ;
191+ int rval ;
193192
194193 rval = ha -> isp_ops -> abort_command (sp );
195194
196195 ql_dbg (ql_dbg_io , fcport -> vha , 0x212b ,
197- "%s: %s LS command for sp=%p on fcport=%p rval=%x\n" , __func__ ,
196+ "%s: %s command for sp=%p on fcport=%p rval=%x\n" , __func__ ,
198197 (rval != QLA_SUCCESS ) ? "Failed to abort" : "Aborted" ,
199198 sp , fcport , rval );
200199}
201200
201+ static void qla_nvme_ls_abort (struct nvme_fc_local_port * lport ,
202+ struct nvme_fc_remote_port * rport , struct nvmefc_ls_req * fd )
203+ {
204+ struct nvme_private * priv = fd -> private ;
205+
206+ INIT_WORK (& priv -> abort_work , qla_nvme_abort_work );
207+ schedule_work (& priv -> abort_work );
208+ }
209+
202210static void qla_nvme_ls_complete (struct work_struct * work )
203211{
204212 struct nvme_private * priv =
@@ -264,18 +272,9 @@ static void qla_nvme_fcp_abort(struct nvme_fc_local_port *lport,
264272 struct nvmefc_fcp_req * fd )
265273{
266274 struct nvme_private * priv = fd -> private ;
267- srb_t * sp = priv -> sp ;
268- int rval ;
269- struct qla_nvme_rport * qla_rport = rport -> private ;
270- fc_port_t * fcport = qla_rport -> fcport ;
271- struct qla_hw_data * ha = fcport -> vha -> hw ;
272-
273- rval = ha -> isp_ops -> abort_command (sp );
274275
275- ql_dbg (ql_dbg_io , fcport -> vha , 0x2127 ,
276- "%s: %s command for sp=%p on fcport=%p rval=%x\n" , __func__ ,
277- (rval != QLA_SUCCESS ) ? "Failed to abort" : "Aborted" ,
278- sp , fcport , rval );
276+ INIT_WORK (& priv -> abort_work , qla_nvme_abort_work );
277+ schedule_work (& priv -> abort_work );
279278}
280279
281280static void qla_nvme_poll (struct nvme_fc_local_port * lport , void * hw_queue_handle )
@@ -650,6 +649,7 @@ void qla_nvme_delete(struct scsi_qla_host *vha)
650649 ql_log (ql_log_info , fcport -> vha , 0x2114 , "%s: fcport=%p\n" ,
651650 __func__ , fcport );
652651
652+ nvme_fc_set_remoteport_devloss (fcport -> nvme_remote_port , 0 );
653653 init_completion (& fcport -> nvme_del_done );
654654 nvme_fc_unregister_remoteport (fcport -> nvme_remote_port );
655655 wait_for_completion (& fcport -> nvme_del_done );
0 commit comments