Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 204198
b: refs/heads/master
c: 41188cf
h: refs/heads/master
v: v3
  • Loading branch information
Jing Huang authored and James Bottomley committed Jul 27, 2010
1 parent 990ee7d commit f23aeeb
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c507341713114e2510ad7621088b359367adf1ce
refs/heads/master: 41188cf5a60a24bf54df5be70142f0928f413788
13 changes: 11 additions & 2 deletions trunk/drivers/scsi/bfa/fcpim.c
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ bfa_fcs_itnim_sm_offline(struct bfa_fcs_itnim_s *itnim,
switch (event) {
case BFA_FCS_ITNIM_SM_ONLINE:
bfa_sm_set_state(itnim, bfa_fcs_itnim_sm_prli_send);
itnim->prli_retries = 0;
bfa_fcs_itnim_send_prli(itnim, NULL);
break;

Expand Down Expand Up @@ -218,8 +219,16 @@ bfa_fcs_itnim_sm_prli_retry(struct bfa_fcs_itnim_s *itnim,

switch (event) {
case BFA_FCS_ITNIM_SM_TIMEOUT:
bfa_sm_set_state(itnim, bfa_fcs_itnim_sm_prli_send);
bfa_fcs_itnim_send_prli(itnim, NULL);
if (itnim->prli_retries < BFA_FCS_RPORT_MAX_RETRIES) {
itnim->prli_retries++;
bfa_trc(itnim->fcs, itnim->prli_retries);
bfa_sm_set_state(itnim, bfa_fcs_itnim_sm_prli_send);
bfa_fcs_itnim_send_prli(itnim, NULL);
} else {
/* invoke target offline */
bfa_sm_set_state(itnim, bfa_fcs_itnim_sm_offline);
bfa_fcs_rport_logo_imp(itnim->rport);
}
break;

case BFA_FCS_ITNIM_SM_OFFLINE:
Expand Down
2 changes: 2 additions & 0 deletions trunk/drivers/scsi/bfa/fcs_rport.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@

#include <fcs/bfa_fcs_rport.h>

#define BFA_FCS_RPORT_MAX_RETRIES (5)

void bfa_fcs_rport_uf_recv(struct bfa_fcs_rport_s *rport, struct fchs_s *fchs,
u16 len);
void bfa_fcs_rport_scn(struct bfa_fcs_rport_s *rport);
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/scsi/bfa/include/fcs/bfa_fcs_fcpim.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ struct bfa_fcs_itnim_s {
struct bfa_fcs_s *fcs; /* fcs instance */
struct bfa_timer_s timer; /* timer functions */
struct bfa_itnim_s *bfa_itnim; /* BFA itnim struct */
u32 prli_retries; /* max prli retry attempts */
bfa_boolean_t seq_rec; /* seq recovery support */
bfa_boolean_t rec_support; /* REC supported */
bfa_boolean_t conf_comp; /* FCP_CONF support */
Expand Down
4 changes: 1 addition & 3 deletions trunk/drivers/scsi/bfa/rport.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@

BFA_TRC_FILE(FCS, RPORT);

#define BFA_FCS_RPORT_MAX_RETRIES (5)

/* In millisecs */
static u32 bfa_fcs_rport_del_timeout =
BFA_FCS_RPORT_DEF_DEL_TIMEOUT * 1000;
Expand Down Expand Up @@ -356,8 +354,8 @@ bfa_fcs_rport_sm_plogi_retry(struct bfa_fcs_rport_s *rport,
*/

case RPSM_EVENT_TIMEOUT:
rport->plogi_retries++;
if (rport->plogi_retries < BFA_FCS_RPORT_MAX_RETRIES) {
rport->plogi_retries++;
bfa_sm_set_state(rport, bfa_fcs_rport_sm_plogi_sending);
bfa_fcs_rport_send_plogi(rport, NULL);
} else {
Expand Down

0 comments on commit f23aeeb

Please sign in to comment.