[SCSI] libfc fcoe: increase ELS and CT timeouts
authorJoe Eykholt <jeykholt@cisco.com>
Tue, 3 Nov 2009 19:50:21 +0000 (11:50 -0800)
committerJames Bottomley <James.Bottomley@suse.de>
Fri, 4 Dec 2009 18:01:27 +0000 (12:01 -0600)
The FC-LS spec. says ELS timeouts should be 2 x R_A_TOV.
The FC-GS spec. says CT timeouts should be 3 x R_A_TOV.

We've been using E_D_TOV for both of those.

Change for all ELS and CT requests except FLOGI, which we
leave at 2 seconds (using E_D_TOV).  One could argue that
R_A_TOV is locally determined until after FLOGI succeeds.

This does change FLOGI for vports which becomes FDISC.
This does not change the REC/SRR timeout which is 2 seconds.

Signed-off-by: Joe Eykholt <jeykholt@cisco.com>
Signed-off-by: Robert Love <robert.w.love@intel.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
drivers/scsi/fcoe/fcoe.c
drivers/scsi/libfc/fc_disc.c
drivers/scsi/libfc/fc_lport.c
drivers/scsi/libfc/fc_rport.c

index b570f39faa3a61b2046c4d5c21e57e465e9c9c5f..4a43b74c0d27b60b4e9200411a057494e5564cf6 100644 (file)
@@ -2428,5 +2428,5 @@ static void fcoe_set_vport_symbolic_name(struct fc_vport *vport)
        if (!fp)
                return;
        lport->tt.elsct_send(lport, FC_FID_DIR_SERV, fp, FC_NS_RSPN_ID,
-                            NULL, NULL, lport->e_d_tov);
+                            NULL, NULL, 3 * lport->r_a_tov);
 }
index 7b790ad15a939e1122b438a0b0cee1048d7a129e..9b0a5192a965d94552396d9ccac680892c795921 100644 (file)
@@ -370,7 +370,7 @@ static void fc_disc_gpn_ft_req(struct fc_disc *disc)
        if (lport->tt.elsct_send(lport, 0, fp,
                                 FC_NS_GPN_FT,
                                 fc_disc_gpn_ft_resp,
-                                disc, lport->e_d_tov))
+                                disc, 3 * lport->r_a_tov))
                return;
 err:
        fc_disc_error(disc, NULL);
@@ -654,7 +654,8 @@ static int fc_disc_gpn_id_req(struct fc_lport *lport,
        if (!fp)
                return -ENOMEM;
        if (!lport->tt.elsct_send(lport, rdata->ids.port_id, fp, FC_NS_GPN_ID,
-                                 fc_disc_gpn_id_resp, rdata, lport->e_d_tov))
+                                 fc_disc_gpn_id_resp, rdata,
+                                 3 * lport->r_a_tov))
                return -ENOMEM;
        kref_get(&rdata->kref);
        return 0;
index 1bcc5e11d2c05226bd78e61130dbf0454d93b534..c841d547c298e0756f33e767649a37f7a69298d1 100644 (file)
@@ -1191,7 +1191,8 @@ static void fc_lport_enter_scr(struct fc_lport *lport)
        }
 
        if (!lport->tt.elsct_send(lport, FC_FID_FCTRL, fp, ELS_SCR,
-                                 fc_lport_scr_resp, lport, lport->e_d_tov))
+                                 fc_lport_scr_resp, lport,
+                                 2 * lport->r_a_tov))
                fc_lport_error(lport, NULL);
 }
 
@@ -1257,7 +1258,7 @@ static void fc_lport_enter_ns(struct fc_lport *lport, enum fc_lport_state state)
 
        if (!lport->tt.elsct_send(lport, FC_FID_DIR_SERV, fp, cmd,
                                  fc_lport_ns_resp,
-                                 lport, lport->e_d_tov))
+                                 lport, 3 * lport->r_a_tov))
                fc_lport_error(lport, fp);
 }
 
@@ -1414,7 +1415,8 @@ static void fc_lport_enter_logo(struct fc_lport *lport)
        }
 
        if (!lport->tt.elsct_send(lport, FC_FID_FLOGI, fp, ELS_LOGO,
-                                 fc_lport_logo_resp, lport, lport->e_d_tov))
+                                 fc_lport_logo_resp, lport,
+                                 2 * lport->r_a_tov))
                fc_lport_error(lport, NULL);
 }
 
@@ -1534,7 +1536,9 @@ void fc_lport_enter_flogi(struct fc_lport *lport)
 
        if (!lport->tt.elsct_send(lport, FC_FID_FLOGI, fp,
                                  lport->vport ? ELS_FDISC : ELS_FLOGI,
-                                 fc_lport_flogi_resp, lport, lport->e_d_tov))
+                                 fc_lport_flogi_resp, lport,
+                                 lport->vport ? 2 * lport->r_a_tov :
+                                 lport->e_d_tov))
                fc_lport_error(lport, NULL);
 }
 
index 6578968a753db9bb438c63ea024246e7551386e0..91e2ba27f7bd29093e5f5670c87c1c82b8b6a324 100644 (file)
@@ -668,7 +668,8 @@ static void fc_rport_enter_plogi(struct fc_rport_priv *rdata)
        rdata->e_d_tov = lport->e_d_tov;
 
        if (!lport->tt.elsct_send(lport, rdata->ids.port_id, fp, ELS_PLOGI,
-                                 fc_rport_plogi_resp, rdata, lport->e_d_tov))
+                                 fc_rport_plogi_resp, rdata,
+                                 2 * lport->r_a_tov))
                fc_rport_error_retry(rdata, NULL);
        else
                kref_get(&rdata->kref);
@@ -829,7 +830,8 @@ static void fc_rport_enter_prli(struct fc_rport_priv *rdata)
        }
 
        if (!lport->tt.elsct_send(lport, rdata->ids.port_id, fp, ELS_PRLI,
-                                 fc_rport_prli_resp, rdata, lport->e_d_tov))
+                                 fc_rport_prli_resp, rdata,
+                                 2 * lport->r_a_tov))
                fc_rport_error_retry(rdata, NULL);
        else
                kref_get(&rdata->kref);
@@ -925,7 +927,8 @@ static void fc_rport_enter_rtv(struct fc_rport_priv *rdata)
        }
 
        if (!lport->tt.elsct_send(lport, rdata->ids.port_id, fp, ELS_RTV,
-                                 fc_rport_rtv_resp, rdata, lport->e_d_tov))
+                                 fc_rport_rtv_resp, rdata,
+                                 2 * lport->r_a_tov))
                fc_rport_error_retry(rdata, NULL);
        else
                kref_get(&rdata->kref);
@@ -955,7 +958,8 @@ static void fc_rport_enter_logo(struct fc_rport_priv *rdata)
        }
 
        if (!lport->tt.elsct_send(lport, rdata->ids.port_id, fp, ELS_LOGO,
-                                 fc_rport_logo_resp, rdata, lport->e_d_tov))
+                                 fc_rport_logo_resp, rdata,
+                                 2 * lport->r_a_tov))
                fc_rport_error_retry(rdata, NULL);
        else
                kref_get(&rdata->kref);
@@ -1042,7 +1046,8 @@ static void fc_rport_enter_adisc(struct fc_rport_priv *rdata)
                return;
        }
        if (!lport->tt.elsct_send(lport, rdata->ids.port_id, fp, ELS_ADISC,
-                                 fc_rport_adisc_resp, rdata, lport->e_d_tov))
+                                 fc_rport_adisc_resp, rdata,
+                                 2 * lport->r_a_tov))
                fc_rport_error_retry(rdata, NULL);
        else
                kref_get(&rdata->kref);