}
/*
- * If we're unloading, don't abort iocb on the ELS ring, but change
- * the callback so that nothing happens when it finishes.
+ * Always abort the outstanding WQE and set the IA bit correctly
+ * for the context. This is necessary for correctly removing
+ * outstanding ndlp reference counts when the CQE completes with
+ * the XB bit set.
*/
- if (test_bit(FC_UNLOADING, &vport->load_flag) &&
- pring->ringno == LPFC_ELS_RING) {
- if (cmdiocb->cmd_flag & LPFC_IO_FABRIC)
- cmdiocb->fabric_cmd_cmpl = lpfc_ignore_els_cmpl;
- else
- cmdiocb->cmd_cmpl = lpfc_ignore_els_cmpl;
- return retval;
- }
-
- /* issue ABTS for this IOCB based on iotag */
abtsiocbp = __lpfc_sli_get_iocbq(phba);
if (abtsiocbp == NULL)
return IOCB_NORESOURCE;