diff options
author | Vijaya Mohan Guvva <vmohan@brocade.com> | 2013-05-13 05:33:25 -0400 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2013-06-26 15:03:20 -0400 |
commit | f2a0cc3ffd5ee123086b8e76522a85a937d89878 (patch) | |
tree | cabf9ad8e4e0d0f522fd6e47ab33182249fb66c0 /drivers/scsi/bfa | |
parent | e1aaab89dee184646f7001850e1fe6d55090a728 (diff) |
[SCSI] bfa: Fix FDISC timeout handling
Retry FDISC a max of 6 times. Introduce new events to handle vport
login fails due to max logins to fabric/switch.
Signed-off-by: Anil Gurumurthy <agurumur@brocade.com>
Signed-off-by: Vijaya Mohan Guvva <vmohan@brocade.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/bfa')
-rw-r--r-- | drivers/scsi/bfa/bfa_fcs_lport.c | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/drivers/scsi/bfa/bfa_fcs_lport.c b/drivers/scsi/bfa/bfa_fcs_lport.c index 8773d5e10d30..2f61a5af3658 100644 --- a/drivers/scsi/bfa/bfa_fcs_lport.c +++ b/drivers/scsi/bfa/bfa_fcs_lport.c | |||
@@ -5988,6 +5988,7 @@ enum bfa_fcs_vport_event { | |||
5988 | BFA_FCS_VPORT_SM_RSP_DUP_WWN = 12, /* Dup wnn error*/ | 5988 | BFA_FCS_VPORT_SM_RSP_DUP_WWN = 12, /* Dup wnn error*/ |
5989 | BFA_FCS_VPORT_SM_RSP_FAILED = 13, /* non-retryable failure */ | 5989 | BFA_FCS_VPORT_SM_RSP_FAILED = 13, /* non-retryable failure */ |
5990 | BFA_FCS_VPORT_SM_STOPCOMP = 14, /* vport delete completion */ | 5990 | BFA_FCS_VPORT_SM_STOPCOMP = 14, /* vport delete completion */ |
5991 | BFA_FCS_VPORT_SM_FABRIC_MAX = 15, /* max vports on fabric */ | ||
5991 | }; | 5992 | }; |
5992 | 5993 | ||
5993 | static void bfa_fcs_vport_sm_uninit(struct bfa_fcs_vport_s *vport, | 5994 | static void bfa_fcs_vport_sm_uninit(struct bfa_fcs_vport_s *vport, |
@@ -6173,6 +6174,7 @@ bfa_fcs_vport_sm_fdisc(struct bfa_fcs_vport_s *vport, | |||
6173 | break; | 6174 | break; |
6174 | 6175 | ||
6175 | case BFA_FCS_VPORT_SM_RSP_FAILED: | 6176 | case BFA_FCS_VPORT_SM_RSP_FAILED: |
6177 | case BFA_FCS_VPORT_SM_FABRIC_MAX: | ||
6176 | bfa_sm_set_state(vport, bfa_fcs_vport_sm_offline); | 6178 | bfa_sm_set_state(vport, bfa_fcs_vport_sm_offline); |
6177 | break; | 6179 | break; |
6178 | 6180 | ||
@@ -6243,6 +6245,7 @@ bfa_fcs_vport_sm_fdisc_rsp_wait(struct bfa_fcs_vport_s *vport, | |||
6243 | case BFA_FCS_VPORT_SM_OFFLINE: | 6245 | case BFA_FCS_VPORT_SM_OFFLINE: |
6244 | case BFA_FCS_VPORT_SM_RSP_ERROR: | 6246 | case BFA_FCS_VPORT_SM_RSP_ERROR: |
6245 | case BFA_FCS_VPORT_SM_RSP_FAILED: | 6247 | case BFA_FCS_VPORT_SM_RSP_FAILED: |
6248 | case BFA_FCS_VPORT_SM_FABRIC_MAX: | ||
6246 | case BFA_FCS_VPORT_SM_RSP_DUP_WWN: | 6249 | case BFA_FCS_VPORT_SM_RSP_DUP_WWN: |
6247 | bfa_sm_set_state(vport, bfa_fcs_vport_sm_cleanup); | 6250 | bfa_sm_set_state(vport, bfa_fcs_vport_sm_cleanup); |
6248 | bfa_sm_send_event(vport->lps, BFA_LPS_SM_OFFLINE); | 6251 | bfa_sm_send_event(vport->lps, BFA_LPS_SM_OFFLINE); |
@@ -6528,7 +6531,7 @@ bfa_fcs_vport_fdisc_rejected(struct bfa_fcs_vport_s *vport) | |||
6528 | else { | 6531 | else { |
6529 | bfa_fcs_vport_aen_post(&vport->lport, | 6532 | bfa_fcs_vport_aen_post(&vport->lport, |
6530 | BFA_LPORT_AEN_NPIV_FABRIC_MAX); | 6533 | BFA_LPORT_AEN_NPIV_FABRIC_MAX); |
6531 | bfa_sm_send_event(vport, BFA_FCS_VPORT_SM_RSP_FAILED); | 6534 | bfa_sm_send_event(vport, BFA_FCS_VPORT_SM_FABRIC_MAX); |
6532 | } | 6535 | } |
6533 | break; | 6536 | break; |
6534 | 6537 | ||
@@ -6914,7 +6917,19 @@ bfa_cb_lps_fdisc_comp(void *bfad, void *uarg, bfa_status_t status) | |||
6914 | break; | 6917 | break; |
6915 | } | 6918 | } |
6916 | 6919 | ||
6917 | bfa_sm_send_event(vport, BFA_FCS_VPORT_SM_RSP_ERROR); | 6920 | if (vport->fdisc_retries < BFA_FCS_VPORT_MAX_RETRIES) |
6921 | bfa_sm_send_event(vport, BFA_FCS_VPORT_SM_RSP_ERROR); | ||
6922 | else | ||
6923 | bfa_sm_send_event(vport, BFA_FCS_VPORT_SM_RSP_FAILED); | ||
6924 | |||
6925 | break; | ||
6926 | |||
6927 | case BFA_STATUS_ETIMER: | ||
6928 | vport->vport_stats.fdisc_timeouts++; | ||
6929 | if (vport->fdisc_retries < BFA_FCS_VPORT_MAX_RETRIES) | ||
6930 | bfa_sm_send_event(vport, BFA_FCS_VPORT_SM_RSP_ERROR); | ||
6931 | else | ||
6932 | bfa_sm_send_event(vport, BFA_FCS_VPORT_SM_RSP_FAILED); | ||
6918 | break; | 6933 | break; |
6919 | 6934 | ||
6920 | case BFA_STATUS_FABRIC_RJT: | 6935 | case BFA_STATUS_FABRIC_RJT: |