You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
lpfc: Fix default RA_TOV and ED_TOV in the FC/FCoE driver for all topologies
Initial link up defaults were not properly being tracked relative to initial FLOGI or pt2pt PLOGI. Add code to initialize them. Signed-off-by: Dick Kennedy <dick.kennedy@avagotech.com> Signed-off-by: James Smart <james.smart@avagotech.com> Reviewed-by: Hannes Reinecke <hare@suse.com> Signed-off-by: James Bottomley <JBottomley@Odin.com>
This commit is contained in:
committed by
James Bottomley
parent
8fe5c16557
commit
21bf0b977a
@@ -2974,7 +2974,8 @@ lpfc_mbx_cmpl_read_sparam(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmb)
|
|||||||
MAILBOX_t *mb = &pmb->u.mb;
|
MAILBOX_t *mb = &pmb->u.mb;
|
||||||
struct lpfc_dmabuf *mp = (struct lpfc_dmabuf *) pmb->context1;
|
struct lpfc_dmabuf *mp = (struct lpfc_dmabuf *) pmb->context1;
|
||||||
struct lpfc_vport *vport = pmb->vport;
|
struct lpfc_vport *vport = pmb->vport;
|
||||||
|
struct serv_parm *sp = &vport->fc_sparam;
|
||||||
|
uint32_t ed_tov;
|
||||||
|
|
||||||
/* Check for error */
|
/* Check for error */
|
||||||
if (mb->mbxStatus) {
|
if (mb->mbxStatus) {
|
||||||
@@ -2989,6 +2990,18 @@ lpfc_mbx_cmpl_read_sparam(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmb)
|
|||||||
|
|
||||||
memcpy((uint8_t *) &vport->fc_sparam, (uint8_t *) mp->virt,
|
memcpy((uint8_t *) &vport->fc_sparam, (uint8_t *) mp->virt,
|
||||||
sizeof (struct serv_parm));
|
sizeof (struct serv_parm));
|
||||||
|
|
||||||
|
ed_tov = be32_to_cpu(sp->cmn.e_d_tov);
|
||||||
|
if (sp->cmn.edtovResolution) /* E_D_TOV ticks are in nanoseconds */
|
||||||
|
ed_tov = (ed_tov + 999999) / 1000000;
|
||||||
|
|
||||||
|
phba->fc_edtov = ed_tov;
|
||||||
|
phba->fc_ratov = (2 * ed_tov) / 1000;
|
||||||
|
if (phba->fc_ratov < FF_DEF_RATOV) {
|
||||||
|
/* RA_TOV should be atleast 10sec for initial flogi */
|
||||||
|
phba->fc_ratov = FF_DEF_RATOV;
|
||||||
|
}
|
||||||
|
|
||||||
lpfc_update_vport_wwn(vport);
|
lpfc_update_vport_wwn(vport);
|
||||||
if (vport->port_type == LPFC_PHYSICAL_PORT) {
|
if (vport->port_type == LPFC_PHYSICAL_PORT) {
|
||||||
memcpy(&phba->wwnn, &vport->fc_nodename, sizeof(phba->wwnn));
|
memcpy(&phba->wwnn, &vport->fc_nodename, sizeof(phba->wwnn));
|
||||||
|
|||||||
@@ -33,7 +33,7 @@
|
|||||||
|
|
||||||
#define FF_DEF_EDTOV 2000 /* Default E_D_TOV (2000ms) */
|
#define FF_DEF_EDTOV 2000 /* Default E_D_TOV (2000ms) */
|
||||||
#define FF_DEF_ALTOV 15 /* Default AL_TIME (15ms) */
|
#define FF_DEF_ALTOV 15 /* Default AL_TIME (15ms) */
|
||||||
#define FF_DEF_RATOV 2 /* Default RA_TOV (2s) */
|
#define FF_DEF_RATOV 10 /* Default RA_TOV (10s) */
|
||||||
#define FF_DEF_ARBTOV 1900 /* Default ARB_TOV (1900ms) */
|
#define FF_DEF_ARBTOV 1900 /* Default ARB_TOV (1900ms) */
|
||||||
|
|
||||||
#define LPFC_BUF_RING0 64 /* Number of buffers to post to RING
|
#define LPFC_BUF_RING0 64 /* Number of buffers to post to RING
|
||||||
|
|||||||
Reference in New Issue
Block a user