mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-11-01 17:08:10 +00:00
[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>
This commit is contained in:
parent
d17bf602fb
commit
a366695592
4 changed files with 4 additions and 1 deletions
|
@ -146,6 +146,7 @@ static int fcoe_lport_config(struct fc_lport *lp)
|
||||||
lp->link_up = 0;
|
lp->link_up = 0;
|
||||||
lp->qfull = 0;
|
lp->qfull = 0;
|
||||||
lp->max_retry_count = 3;
|
lp->max_retry_count = 3;
|
||||||
|
lp->max_rport_retry_count = 3;
|
||||||
lp->e_d_tov = 2 * 1000; /* FC-FS default */
|
lp->e_d_tov = 2 * 1000; /* FC-FS default */
|
||||||
lp->r_a_tov = 2 * 2 * 1000;
|
lp->r_a_tov = 2 * 2 * 1000;
|
||||||
lp->service_params = (FCP_SPPF_INIT_FCN | FCP_SPPF_RD_XRDY_DIS |
|
lp->service_params = (FCP_SPPF_INIT_FCN | FCP_SPPF_RD_XRDY_DIS |
|
||||||
|
|
|
@ -680,6 +680,7 @@ static int __devinit fnic_probe(struct pci_dev *pdev,
|
||||||
}
|
}
|
||||||
|
|
||||||
lp->max_retry_count = fnic->config.flogi_retries;
|
lp->max_retry_count = fnic->config.flogi_retries;
|
||||||
|
lp->max_rport_retry_count = fnic->config.plogi_retries;
|
||||||
lp->service_params = (FCP_SPPF_INIT_FCN | FCP_SPPF_RD_XRDY_DIS |
|
lp->service_params = (FCP_SPPF_INIT_FCN | FCP_SPPF_RD_XRDY_DIS |
|
||||||
FCP_SPPF_CONF_COMPL);
|
FCP_SPPF_CONF_COMPL);
|
||||||
if (fnic->config.flags & VFCF_FCP_SEQ_LVL_ERR)
|
if (fnic->config.flags & VFCF_FCP_SEQ_LVL_ERR)
|
||||||
|
|
|
@ -478,7 +478,7 @@ static void fc_rport_error_retry(struct fc_rport *rport, struct fc_frame *fp)
|
||||||
if (PTR_ERR(fp) == -FC_EX_CLOSED)
|
if (PTR_ERR(fp) == -FC_EX_CLOSED)
|
||||||
return fc_rport_error(rport, fp);
|
return fc_rport_error(rport, fp);
|
||||||
|
|
||||||
if (rdata->retries < rdata->local_port->max_retry_count) {
|
if (rdata->retries < rdata->local_port->max_rport_retry_count) {
|
||||||
FC_DEBUG_RPORT("Error %ld in state %s, retrying\n",
|
FC_DEBUG_RPORT("Error %ld in state %s, retrying\n",
|
||||||
PTR_ERR(fp), fc_rport_state(rport));
|
PTR_ERR(fp), fc_rport_state(rport));
|
||||||
rdata->retries++;
|
rdata->retries++;
|
||||||
|
|
|
@ -679,6 +679,7 @@ struct fc_lport {
|
||||||
unsigned int e_d_tov;
|
unsigned int e_d_tov;
|
||||||
unsigned int r_a_tov;
|
unsigned int r_a_tov;
|
||||||
u8 max_retry_count;
|
u8 max_retry_count;
|
||||||
|
u8 max_rport_retry_count;
|
||||||
u16 link_speed;
|
u16 link_speed;
|
||||||
u16 link_supported_speeds;
|
u16 link_supported_speeds;
|
||||||
u16 lro_xid; /* max xid for fcoe lro */
|
u16 lro_xid; /* max xid for fcoe lro */
|
||||||
|
|
Loading…
Reference in a new issue