]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/blobdiff - drivers/scsi/qla2xxx/qla_gs.c
scsi: qla2xxx: Prevent relogin trigger from sending too many commands
[mirror_ubuntu-hirsute-kernel.git] / drivers / scsi / qla2xxx / qla_gs.c
index abc31b983b9302c48b595c195a1de0b62b1de208..546011b1a7659b5a26882c9b7f2a0d8a01421c9f 100644 (file)
@@ -3088,7 +3088,7 @@ static void qla2x00_async_gidpn_sp_done(void *s, int res)
        u8 *id = fcport->ct_desc.ct_sns->p.rsp.rsp.gid_pn.port_id;
        struct event_arg ea;
 
-       fcport->flags &= ~FCF_ASYNC_SENT;
+       fcport->flags &= ~(FCF_ASYNC_SENT | FCF_ASYNC_ACTIVE);
 
        memset(&ea, 0, sizeof(ea));
        ea.fcport = fcport;
@@ -3197,6 +3197,7 @@ int qla24xx_post_gidpn_work(struct scsi_qla_host *vha, fc_port_t *fcport)
                return QLA_FUNCTION_FAILED;
 
        e->u.fcport.fcport = fcport;
+       fcport->flags |= FCF_ASYNC_ACTIVE;
        return qla2x00_post_work(vha, e);
 }
 
@@ -3209,6 +3210,7 @@ int qla24xx_post_gpsc_work(struct scsi_qla_host *vha, fc_port_t *fcport)
                return QLA_FUNCTION_FAILED;
 
        e->u.fcport.fcport = fcport;
+       fcport->flags |= FCF_ASYNC_ACTIVE;
        return qla2x00_post_work(vha, e);
 }
 
@@ -3256,7 +3258,7 @@ static void qla24xx_async_gpsc_sp_done(void *s, int res)
            "Async done-%s res %x, WWPN %8phC \n",
            sp->name, res, fcport->port_name);
 
-       fcport->flags &= ~FCF_ASYNC_SENT;
+       fcport->flags &= ~(FCF_ASYNC_SENT | FCF_ASYNC_ACTIVE);
 
        if (res == (DID_ERROR << 16)) {
                /* entry status error */