#define QLA_SA_UPDATE_FLAGS_RX_KEY      0x0
 #define QLA_SA_UPDATE_FLAGS_TX_KEY      0x2
+#define EDIF_MSLEEP_INTERVAL 100
+#define EDIF_RETRY_COUNT  50
 
 int
 qla24xx_sadb_update(struct bsg_job *bsg_job)
        struct edif_list_entry *edif_entry = NULL;
        int                     found = 0;
        int                     rval = 0;
-       int result = 0;
+       int result = 0, cnt;
        struct qla_sa_update_frame sa_frame;
        struct srb_iocb *iocb_cmd;
        port_id_t portid;
        sp->done = qla2x00_bsg_job_done;
        iocb_cmd = &sp->u.iocb_cmd;
        iocb_cmd->u.sa_update.sa_frame  = sa_frame;
-
+       cnt = 0;
+retry:
        rval = qla2x00_start_sp(sp);
-       if (rval != QLA_SUCCESS) {
+       switch (rval) {
+       case QLA_SUCCESS:
+               break;
+       case EAGAIN:
+               msleep(EDIF_MSLEEP_INTERVAL);
+               cnt++;
+               if (cnt < EDIF_RETRY_COUNT)
+                       goto retry;
+
+               fallthrough;
+       default:
                ql_log(ql_dbg_edif, vha, 0x70e3,
-                   "qla2x00_start_sp failed=%d.\n", rval);
+                      "%s qla2x00_start_sp failed=%d.\n",
+                      __func__, rval);
 
                qla2x00_rel_sp(sp);
                rval = -EIO;
        rval = qla2x00_start_sp(sp);
 
        if (rval != QLA_SUCCESS) {
-               rval = QLA_FUNCTION_FAILED;
                goto done_free_sp;
        }
 
        fc_port_t *fcport = NULL;
        struct qla_hw_data *ha = vha->hw;
        srb_t *sp;
-       int rval =  (DID_ERROR << 16);
+       int rval =  (DID_ERROR << 16), cnt;
        port_id_t d_id;
        struct qla_bsg_auth_els_request *p =
            (struct qla_bsg_auth_els_request *)bsg_job->request;
        sp->free = qla2x00_bsg_sp_free;
        sp->done = qla2x00_bsg_job_done;
 
+       cnt = 0;
+retry:
        rval = qla2x00_start_sp(sp);
-
-       ql_dbg(ql_dbg_edif, vha, 0x700a,
-           "%s %s %8phN xchg %x ctlflag %x hdl %x reqlen %xh bsg ptr %p\n",
-           __func__, sc_to_str(p->e.sub_cmd), fcport->port_name,
-           p->e.extra_rx_xchg_address, p->e.extra_control_flags,
-           sp->handle, sp->remap.req.len, bsg_job);
-
-       if (rval != QLA_SUCCESS) {
+       switch (rval) {
+       case QLA_SUCCESS:
+               ql_dbg(ql_dbg_edif, vha, 0x700a,
+                      "%s %s %8phN xchg %x ctlflag %x hdl %x reqlen %xh bsg ptr %p\n",
+                      __func__, sc_to_str(p->e.sub_cmd), fcport->port_name,
+                      p->e.extra_rx_xchg_address, p->e.extra_control_flags,
+                      sp->handle, sp->remap.req.len, bsg_job);
+               break;
+       case EAGAIN:
+               msleep(EDIF_MSLEEP_INTERVAL);
+               cnt++;
+               if (cnt < EDIF_RETRY_COUNT)
+                       goto retry;
+               fallthrough;
+       default:
                ql_log(ql_log_warn, vha, 0x700e,
-                   "qla2x00_start_sp failed = %d\n", rval);
+                   "%s qla2x00_start_sp failed = %d\n", __func__, rval);
                SET_DID_STATUS(bsg_reply->result, DID_IMM_RETRY);
                rval = -EIO;
                goto done_free_remap_rsp;