aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAbhijeet Joglekar <abjoglek@cisco.com>2009-05-01 13:01:26 -0400
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2009-05-23 16:44:18 -0400
commita366695592ebc9151dd5a248681270f0925d8324 (patch)
treecbf40a330cdd04733a34fb8f684cfe1d7a979c31
parentd17bf602fbfe4a5ab134a90f6c082fa161d398ee (diff)
[SCSI] libfc,fcoe,fnic: Separate rport and lport max retry counts
This allows fnic to configure number of retries for lport and rport separately. Signed-off-by: Abhijeet Joglekar <abjoglek@cisco.com> Acked-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
-rw-r--r--drivers/scsi/fcoe/fcoe.c1
-rw-r--r--drivers/scsi/fnic/fnic_main.c1
-rw-r--r--drivers/scsi/libfc/fc_rport.c2
-rw-r--r--include/scsi/libfc.h1
4 files changed, 4 insertions, 1 deletions
diff --git a/drivers/scsi/fcoe/fcoe.c b/drivers/scsi/fcoe/fcoe.c
index d08121f246c3..6acb7778f557 100644
--- a/drivers/scsi/fcoe/fcoe.c
+++ b/drivers/scsi/fcoe/fcoe.c
@@ -146,6 +146,7 @@ static int fcoe_lport_config(struct fc_lport *lp)
146 lp->link_up = 0; 146 lp->link_up = 0;
147 lp->qfull = 0; 147 lp->qfull = 0;
148 lp->max_retry_count = 3; 148 lp->max_retry_count = 3;
149 lp->max_rport_retry_count = 3;
149 lp->e_d_tov = 2 * 1000; /* FC-FS default */ 150 lp->e_d_tov = 2 * 1000; /* FC-FS default */
150 lp->r_a_tov = 2 * 2 * 1000; 151 lp->r_a_tov = 2 * 2 * 1000;
151 lp->service_params = (FCP_SPPF_INIT_FCN | FCP_SPPF_RD_XRDY_DIS | 152 lp->service_params = (FCP_SPPF_INIT_FCN | FCP_SPPF_RD_XRDY_DIS |
diff --git a/drivers/scsi/fnic/fnic_main.c b/drivers/scsi/fnic/fnic_main.c
index 32ef6b87d895..a84072865fc2 100644
--- a/drivers/scsi/fnic/fnic_main.c
+++ b/drivers/scsi/fnic/fnic_main.c
@@ -680,6 +680,7 @@ static int __devinit fnic_probe(struct pci_dev *pdev,
680 } 680 }
681 681
682 lp->max_retry_count = fnic->config.flogi_retries; 682 lp->max_retry_count = fnic->config.flogi_retries;
683 lp->max_rport_retry_count = fnic->config.plogi_retries;
683 lp->service_params = (FCP_SPPF_INIT_FCN | FCP_SPPF_RD_XRDY_DIS | 684 lp->service_params = (FCP_SPPF_INIT_FCN | FCP_SPPF_RD_XRDY_DIS |
684 FCP_SPPF_CONF_COMPL); 685 FCP_SPPF_CONF_COMPL);
685 if (fnic->config.flags & VFCF_FCP_SEQ_LVL_ERR) 686 if (fnic->config.flags & VFCF_FCP_SEQ_LVL_ERR)
diff --git a/drivers/scsi/libfc/fc_rport.c b/drivers/scsi/libfc/fc_rport.c
index 3f5094ebc397..7bfbff7e0efb 100644
--- a/drivers/scsi/libfc/fc_rport.c
+++ b/drivers/scsi/libfc/fc_rport.c
@@ -478,7 +478,7 @@ static void fc_rport_error_retry(struct fc_rport *rport, struct fc_frame *fp)
478 if (PTR_ERR(fp) == -FC_EX_CLOSED) 478 if (PTR_ERR(fp) == -FC_EX_CLOSED)
479 return fc_rport_error(rport, fp); 479 return fc_rport_error(rport, fp);
480 480
481 if (rdata->retries < rdata->local_port->max_retry_count) { 481 if (rdata->retries < rdata->local_port->max_rport_retry_count) {
482 FC_DEBUG_RPORT("Error %ld in state %s, retrying\n", 482 FC_DEBUG_RPORT("Error %ld in state %s, retrying\n",
483 PTR_ERR(fp), fc_rport_state(rport)); 483 PTR_ERR(fp), fc_rport_state(rport));
484 rdata->retries++; 484 rdata->retries++;
diff --git a/include/scsi/libfc.h b/include/scsi/libfc.h
index 45f9cc642c46..ebdd9f4cf070 100644
--- a/include/scsi/libfc.h
+++ b/include/scsi/libfc.h
@@ -679,6 +679,7 @@ struct fc_lport {
679 unsigned int e_d_tov; 679 unsigned int e_d_tov;
680 unsigned int r_a_tov; 680 unsigned int r_a_tov;
681 u8 max_retry_count; 681 u8 max_retry_count;
682 u8 max_rport_retry_count;
682 u16 link_speed; 683 u16 link_speed;
683 u16 link_supported_speeds; 684 u16 link_supported_speeds;
684 u16 lro_xid; /* max xid for fcoe lro */ 685 u16 lro_xid; /* max xid for fcoe lro */