aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/libfc
diff options
context:
space:
mode:
authorJoe Eykholt <jeykholt@cisco.com>2009-11-03 14:50:21 -0500
committerJames Bottomley <James.Bottomley@suse.de>2009-12-04 13:01:27 -0500
commitb94f8951bf256674eca3f2a490df17521442afef (patch)
treeae6b246eb65f7ef73167a2b582ce7e670158a958 /drivers/scsi/libfc
parentbe276cbe1bd680ab1f6c297017dd658e5a6b10d2 (diff)
[SCSI] libfc fcoe: increase ELS and CT timeouts
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>
Diffstat (limited to 'drivers/scsi/libfc')
-rw-r--r--drivers/scsi/libfc/fc_disc.c5
-rw-r--r--drivers/scsi/libfc/fc_lport.c12
-rw-r--r--drivers/scsi/libfc/fc_rport.c15
3 files changed, 21 insertions, 11 deletions
diff --git a/drivers/scsi/libfc/fc_disc.c b/drivers/scsi/libfc/fc_disc.c
index 7b790ad15a93..9b0a5192a965 100644
--- a/drivers/scsi/libfc/fc_disc.c
+++ b/drivers/scsi/libfc/fc_disc.c
@@ -370,7 +370,7 @@ static void fc_disc_gpn_ft_req(struct fc_disc *disc)
370 if (lport->tt.elsct_send(lport, 0, fp, 370 if (lport->tt.elsct_send(lport, 0, fp,
371 FC_NS_GPN_FT, 371 FC_NS_GPN_FT,
372 fc_disc_gpn_ft_resp, 372 fc_disc_gpn_ft_resp,
373 disc, lport->e_d_tov)) 373 disc, 3 * lport->r_a_tov))
374 return; 374 return;
375err: 375err:
376 fc_disc_error(disc, NULL); 376 fc_disc_error(disc, NULL);
@@ -654,7 +654,8 @@ static int fc_disc_gpn_id_req(struct fc_lport *lport,
654 if (!fp) 654 if (!fp)
655 return -ENOMEM; 655 return -ENOMEM;
656 if (!lport->tt.elsct_send(lport, rdata->ids.port_id, fp, FC_NS_GPN_ID, 656 if (!lport->tt.elsct_send(lport, rdata->ids.port_id, fp, FC_NS_GPN_ID,
657 fc_disc_gpn_id_resp, rdata, lport->e_d_tov)) 657 fc_disc_gpn_id_resp, rdata,
658 3 * lport->r_a_tov))
658 return -ENOMEM; 659 return -ENOMEM;
659 kref_get(&rdata->kref); 660 kref_get(&rdata->kref);
660 return 0; 661 return 0;
diff --git a/drivers/scsi/libfc/fc_lport.c b/drivers/scsi/libfc/fc_lport.c
index 1bcc5e11d2c0..c841d547c298 100644
--- a/drivers/scsi/libfc/fc_lport.c
+++ b/drivers/scsi/libfc/fc_lport.c
@@ -1191,7 +1191,8 @@ static void fc_lport_enter_scr(struct fc_lport *lport)
1191 } 1191 }
1192 1192
1193 if (!lport->tt.elsct_send(lport, FC_FID_FCTRL, fp, ELS_SCR, 1193 if (!lport->tt.elsct_send(lport, FC_FID_FCTRL, fp, ELS_SCR,
1194 fc_lport_scr_resp, lport, lport->e_d_tov)) 1194 fc_lport_scr_resp, lport,
1195 2 * lport->r_a_tov))
1195 fc_lport_error(lport, NULL); 1196 fc_lport_error(lport, NULL);
1196} 1197}
1197 1198
@@ -1257,7 +1258,7 @@ static void fc_lport_enter_ns(struct fc_lport *lport, enum fc_lport_state state)
1257 1258
1258 if (!lport->tt.elsct_send(lport, FC_FID_DIR_SERV, fp, cmd, 1259 if (!lport->tt.elsct_send(lport, FC_FID_DIR_SERV, fp, cmd,
1259 fc_lport_ns_resp, 1260 fc_lport_ns_resp,
1260 lport, lport->e_d_tov)) 1261 lport, 3 * lport->r_a_tov))
1261 fc_lport_error(lport, fp); 1262 fc_lport_error(lport, fp);
1262} 1263}
1263 1264
@@ -1414,7 +1415,8 @@ static void fc_lport_enter_logo(struct fc_lport *lport)
1414 } 1415 }
1415 1416
1416 if (!lport->tt.elsct_send(lport, FC_FID_FLOGI, fp, ELS_LOGO, 1417 if (!lport->tt.elsct_send(lport, FC_FID_FLOGI, fp, ELS_LOGO,
1417 fc_lport_logo_resp, lport, lport->e_d_tov)) 1418 fc_lport_logo_resp, lport,
1419 2 * lport->r_a_tov))
1418 fc_lport_error(lport, NULL); 1420 fc_lport_error(lport, NULL);
1419} 1421}
1420 1422
@@ -1534,7 +1536,9 @@ void fc_lport_enter_flogi(struct fc_lport *lport)
1534 1536
1535 if (!lport->tt.elsct_send(lport, FC_FID_FLOGI, fp, 1537 if (!lport->tt.elsct_send(lport, FC_FID_FLOGI, fp,
1536 lport->vport ? ELS_FDISC : ELS_FLOGI, 1538 lport->vport ? ELS_FDISC : ELS_FLOGI,
1537 fc_lport_flogi_resp, lport, lport->e_d_tov)) 1539 fc_lport_flogi_resp, lport,
1540 lport->vport ? 2 * lport->r_a_tov :
1541 lport->e_d_tov))
1538 fc_lport_error(lport, NULL); 1542 fc_lport_error(lport, NULL);
1539} 1543}
1540 1544
diff --git a/drivers/scsi/libfc/fc_rport.c b/drivers/scsi/libfc/fc_rport.c
index 6578968a753d..91e2ba27f7bd 100644
--- a/drivers/scsi/libfc/fc_rport.c
+++ b/drivers/scsi/libfc/fc_rport.c
@@ -668,7 +668,8 @@ static void fc_rport_enter_plogi(struct fc_rport_priv *rdata)
668 rdata->e_d_tov = lport->e_d_tov; 668 rdata->e_d_tov = lport->e_d_tov;
669 669
670 if (!lport->tt.elsct_send(lport, rdata->ids.port_id, fp, ELS_PLOGI, 670 if (!lport->tt.elsct_send(lport, rdata->ids.port_id, fp, ELS_PLOGI,
671 fc_rport_plogi_resp, rdata, lport->e_d_tov)) 671 fc_rport_plogi_resp, rdata,
672 2 * lport->r_a_tov))
672 fc_rport_error_retry(rdata, NULL); 673 fc_rport_error_retry(rdata, NULL);
673 else 674 else
674 kref_get(&rdata->kref); 675 kref_get(&rdata->kref);
@@ -829,7 +830,8 @@ static void fc_rport_enter_prli(struct fc_rport_priv *rdata)
829 } 830 }
830 831
831 if (!lport->tt.elsct_send(lport, rdata->ids.port_id, fp, ELS_PRLI, 832 if (!lport->tt.elsct_send(lport, rdata->ids.port_id, fp, ELS_PRLI,
832 fc_rport_prli_resp, rdata, lport->e_d_tov)) 833 fc_rport_prli_resp, rdata,
834 2 * lport->r_a_tov))
833 fc_rport_error_retry(rdata, NULL); 835 fc_rport_error_retry(rdata, NULL);
834 else 836 else
835 kref_get(&rdata->kref); 837 kref_get(&rdata->kref);
@@ -925,7 +927,8 @@ static void fc_rport_enter_rtv(struct fc_rport_priv *rdata)
925 } 927 }
926 928
927 if (!lport->tt.elsct_send(lport, rdata->ids.port_id, fp, ELS_RTV, 929 if (!lport->tt.elsct_send(lport, rdata->ids.port_id, fp, ELS_RTV,
928 fc_rport_rtv_resp, rdata, lport->e_d_tov)) 930 fc_rport_rtv_resp, rdata,
931 2 * lport->r_a_tov))
929 fc_rport_error_retry(rdata, NULL); 932 fc_rport_error_retry(rdata, NULL);
930 else 933 else
931 kref_get(&rdata->kref); 934 kref_get(&rdata->kref);
@@ -955,7 +958,8 @@ static void fc_rport_enter_logo(struct fc_rport_priv *rdata)
955 } 958 }
956 959
957 if (!lport->tt.elsct_send(lport, rdata->ids.port_id, fp, ELS_LOGO, 960 if (!lport->tt.elsct_send(lport, rdata->ids.port_id, fp, ELS_LOGO,
958 fc_rport_logo_resp, rdata, lport->e_d_tov)) 961 fc_rport_logo_resp, rdata,
962 2 * lport->r_a_tov))
959 fc_rport_error_retry(rdata, NULL); 963 fc_rport_error_retry(rdata, NULL);
960 else 964 else
961 kref_get(&rdata->kref); 965 kref_get(&rdata->kref);
@@ -1042,7 +1046,8 @@ static void fc_rport_enter_adisc(struct fc_rport_priv *rdata)
1042 return; 1046 return;
1043 } 1047 }
1044 if (!lport->tt.elsct_send(lport, rdata->ids.port_id, fp, ELS_ADISC, 1048 if (!lport->tt.elsct_send(lport, rdata->ids.port_id, fp, ELS_ADISC,
1045 fc_rport_adisc_resp, rdata, lport->e_d_tov)) 1049 fc_rport_adisc_resp, rdata,
1050 2 * lport->r_a_tov))
1046 fc_rport_error_retry(rdata, NULL); 1051 fc_rport_error_retry(rdata, NULL);
1047 else 1052 else
1048 kref_get(&rdata->kref); 1053 kref_get(&rdata->kref);