]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
[SCSI] bfa: statistics and typo fix
authorJing Huang <huangj@brocade.com>
Fri, 9 Jul 2010 02:48:49 +0000 (19:48 -0700)
committerJames Bottomley <James.Bottomley@suse.de>
Tue, 27 Jul 2010 17:04:07 +0000 (12:04 -0500)
- Added time stamp for fcport stats reset
- Added new fileds to the statistics data structures.
- Typo removal and minor cleanup.

Signed-off-by: Jing Huang <huangj@brocade.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
16 files changed:
drivers/scsi/bfa/bfa_fcpim_priv.h
drivers/scsi/bfa/bfa_fcport.c
drivers/scsi/bfa/bfa_port.c
drivers/scsi/bfa/bfa_port_priv.h
drivers/scsi/bfa/bfad_drv.h
drivers/scsi/bfa/fcpim.c
drivers/scsi/bfa/include/bfa.h
drivers/scsi/bfa/include/cna/port/bfa_port.h
drivers/scsi/bfa/include/defs/bfa_defs_auth.h
drivers/scsi/bfa/include/defs/bfa_defs_fcport.h
drivers/scsi/bfa/include/defs/bfa_defs_iocfc.h
drivers/scsi/bfa/include/defs/bfa_defs_itnim.h
drivers/scsi/bfa/include/defs/bfa_defs_port.h
drivers/scsi/bfa/include/defs/bfa_defs_pport.h
drivers/scsi/bfa/include/defs/bfa_defs_status.h
drivers/scsi/bfa/ms.c

index 5cf418460f75015474274ee8584a6ca67a66dc38..3db39da7242704b186e89d9c32642b190d0adfc9 100644 (file)
@@ -141,6 +141,7 @@ struct bfa_itnim_s {
        struct bfa_reqq_wait_s reqq_wait; /*  to wait for room in reqq */
        struct bfa_fcpim_mod_s *fcpim;  /*  fcpim module                */
        struct bfa_itnim_hal_stats_s    stats;
+       struct bfa_itnim_latency_s  io_latency;
 };
 
 #define bfa_itnim_is_online(_itnim) ((_itnim)->is_online)
index d28b721acaf8fa758096588c48cc48fe1a373ca9..18d33072bec52a7d3b27571b3e040f9584903843 100644 (file)
@@ -888,6 +888,7 @@ bfa_fcport_attach(struct bfa_s *bfa, void *bfad, struct bfa_iocfc_cfg_s *cfg,
        struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa);
        struct bfa_pport_cfg_s *port_cfg = &fcport->cfg;
        struct bfa_fcport_ln_s *ln = &fcport->ln;
+       struct bfa_timeval_s tv;
 
        bfa_os_memset(fcport, 0, sizeof(struct bfa_fcport_s));
        fcport->bfa = bfa;
@@ -898,6 +899,12 @@ bfa_fcport_attach(struct bfa_s *bfa, void *bfad, struct bfa_iocfc_cfg_s *cfg,
        bfa_sm_set_state(fcport, bfa_fcport_sm_uninit);
        bfa_sm_set_state(ln, bfa_fcport_ln_sm_dn);
 
+       /**
+        * initialize time stamp for stats reset
+        */
+       bfa_os_gettimeofday(&tv);
+       fcport->stats_reset_time = tv.tv_sec;
+
        /**
         * initialize and set default configuration
         */
@@ -1126,16 +1133,22 @@ __bfa_cb_fcport_stats_get(void *cbarg, bfa_boolean_t complete)
 
        if (complete) {
                if (fcport->stats_status == BFA_STATUS_OK) {
+                       struct bfa_timeval_s tv;
 
                        /* Swap FC QoS or FCoE stats */
-                       if (bfa_ioc_get_fcmode(&fcport->bfa->ioc))
+                       if (bfa_ioc_get_fcmode(&fcport->bfa->ioc)) {
                                bfa_fcport_qos_stats_swap(
                                        &fcport->stats_ret->fcqos,
                                        &fcport->stats->fcqos);
-                       else
+                       } else {
                                bfa_fcport_fcoe_stats_swap(
                                        &fcport->stats_ret->fcoe,
                                        &fcport->stats->fcoe);
+
+                               bfa_os_gettimeofday(&tv);
+                               fcport->stats_ret->fcoe.secs_reset =
+                                       tv.tv_sec - fcport->stats_reset_time;
+                       }
                }
                fcport->stats_cbfn(fcport->stats_cbarg, fcport->stats_status);
        } else {
@@ -1191,6 +1204,14 @@ __bfa_cb_fcport_stats_clr(void *cbarg, bfa_boolean_t complete)
        struct bfa_fcport_s *fcport = cbarg;
 
        if (complete) {
+               struct bfa_timeval_s tv;
+
+               /**
+                * re-initialize time stamp for stats reset
+                */
+               bfa_os_gettimeofday(&tv);
+               fcport->stats_reset_time = tv.tv_sec;
+
                fcport->stats_cbfn(fcport->stats_cbarg, fcport->stats_status);
        } else {
                fcport->stats_busy = BFA_FALSE;
index cab19028361a387ff36a31c62a87c5168d927881..6773e2282ddc192585f29d28a59203fa22387b0e 100644 (file)
@@ -102,9 +102,14 @@ bfa_port_get_stats_isr(struct bfa_port_s *port, bfa_status_t status)
        port->stats_busy = BFA_FALSE;
 
        if (status == BFA_STATUS_OK) {
+               struct bfa_timeval_s tv;
+
                memcpy(port->stats, port->stats_dma.kva,
                       sizeof(union bfa_pport_stats_u));
                bfa_port_stats_swap(port, port->stats);
+
+               bfa_os_gettimeofday(&tv);
+               port->stats->fc.secs_reset = tv.tv_sec - port->stats_reset_time;
        }
 
        if (port->stats_cbfn) {
@@ -125,9 +130,17 @@ bfa_port_get_stats_isr(struct bfa_port_s *port, bfa_status_t status)
 static void
 bfa_port_clear_stats_isr(struct bfa_port_s *port, bfa_status_t status)
 {
+       struct bfa_timeval_s tv;
+
        port->stats_status = status;
        port->stats_busy = BFA_FALSE;
 
+       /**
+        * re-initialize time stamp for stats reset
+        */
+       bfa_os_gettimeofday(&tv);
+       port->stats_reset_time = tv.tv_sec;
+
        if (port->stats_cbfn) {
                port->stats_cbfn(port->stats_cbarg, status);
                port->stats_cbfn = NULL;
@@ -428,6 +441,8 @@ void
 bfa_port_attach(struct bfa_port_s *port, struct bfa_ioc_s *ioc, void *dev,
                struct bfa_trc_mod_s *trcmod, struct bfa_log_mod_s *logmod)
 {
+       struct bfa_timeval_s tv;
+
        bfa_assert(port);
 
        port->dev = dev;
@@ -435,13 +450,21 @@ bfa_port_attach(struct bfa_port_s *port, struct bfa_ioc_s *ioc, void *dev,
        port->trcmod = trcmod;
        port->logmod = logmod;
 
-       port->stats_busy = port->endis_pending = BFA_FALSE;
-       port->stats_cbfn = port->endis_cbfn = NULL;
+       port->stats_busy = BFA_FALSE;
+       port->endis_pending = BFA_FALSE;
+       port->stats_cbfn = NULL;
+       port->endis_cbfn = NULL;
 
        bfa_ioc_mbox_regisr(port->ioc, BFI_MC_PORT, bfa_port_isr, port);
        bfa_ioc_hbfail_init(&port->hbfail, bfa_port_hbfail, port);
        bfa_ioc_hbfail_register(port->ioc, &port->hbfail);
 
+       /**
+        * initialize time stamp for stats reset
+        */
+       bfa_os_gettimeofday(&tv);
+       port->stats_reset_time = tv.tv_sec;
+
        bfa_trc(port, 0);
 }
 
index c52fe56df0bd9aa8cd0a7bd127f6fc13f1bad413..c9ebe0426fa62b9232111cf3f8ca66a5a4891a3b 100644 (file)
@@ -75,8 +75,9 @@ struct bfa_fcport_s {
        bfa_status_t            stats_status; /*  stats/statsclr status */
        bfa_boolean_t           stats_busy; /*  outstanding stats/statsclr */
        bfa_boolean_t           stats_qfull;
+       u32                     stats_reset_time; /* stats reset time stamp */
        bfa_cb_pport_t          stats_cbfn; /*  driver callback function */
-       void                    *stats_cbarg; /* *!< user callback arg */
+       void                    *stats_cbarg; /* user callback arg */
        bfa_boolean_t           diag_busy; /*  diag busy status */
        bfa_boolean_t           beacon; /*  port beacon status */
        bfa_boolean_t           link_e2e_beacon; /*  link beacon status */
index 2b58b29fe3033083d668c8d7bb824ed76a8c837a..8629f64a52871486ec88c51509dc9cf9af0e5d72 100644 (file)
@@ -141,18 +141,6 @@ struct bfad_cfg_param_s {
        u32        binding_method;
 };
 
-union bfad_tmp_buf {
-       /* From struct bfa_adapter_attr_s */
-       char            manufacturer[BFA_ADAPTER_MFG_NAME_LEN];
-       char            serial_num[BFA_ADAPTER_SERIAL_NUM_LEN];
-       char            model[BFA_ADAPTER_MODEL_NAME_LEN];
-       char            fw_ver[BFA_VERSION_LEN];
-       char            optrom_ver[BFA_VERSION_LEN];
-
-       /* From struct bfa_ioc_pci_attr_s */
-       u8         chip_rev[BFA_IOC_CHIP_REV_LEN];  /*  chip revision */
-};
-
 /*
  * BFAD (PCI function) data structure
  */
@@ -195,7 +183,6 @@ struct bfad_s {
        struct bfa_plog_s      plog_buf;
        int             ref_count;
        bfa_boolean_t   ipfc_enabled;
-       union bfad_tmp_buf tmp_buf;
        struct fc_host_statistics link_stats;
        struct list_head pbc_pcfg_list;
 };
index 8ae4a2cfa85b94bbafdf41277aadd34322a40cde..412018196bd203c6bbefe39c102807fc6d3f4d2e 100644 (file)
@@ -738,6 +738,7 @@ bfa_fcs_itnim_attr_get(struct bfa_fcs_port_s *port, wwn_t rpwwn,
        attr->rec_support = itnim->rec_support;
        attr->conf_comp = itnim->conf_comp;
        attr->task_retry_id = itnim->task_retry_id;
+       bfa_os_memset(&attr->io_latency, 0, sizeof(struct bfa_itnim_latency_s));
 
        return BFA_STATUS_OK;
 }
index 1f5966cfbd166eccbbbd1a708021c277c6bb8b4e..9519a6d81045ad17742caea1a8ac47f52656a597 100644 (file)
@@ -126,6 +126,8 @@ struct bfa_sge_s {
        bfa_ioc_get_type(&(__bfa)->ioc)
 #define bfa_get_mac(__bfa)  \
        bfa_ioc_get_mac(&(__bfa)->ioc)
+#define bfa_get_fw_clock_res(__bfa)    \
+       ((__bfa)->iocfc.cfgrsp->fwcfg.fw_tick_res)
 
 /*
  * bfa API functions
index 7cbf17d3141bea9dab0956eaf0c794773f9643d5..d7babaf97848dcf3357fc30c4ffa7dd10798855b 100644 (file)
@@ -37,6 +37,7 @@ struct bfa_port_s {
        bfa_port_stats_cbfn_t stats_cbfn;
        void           *stats_cbarg;
        bfa_status_t    stats_status;
+       u32             stats_reset_time;
        union bfa_pport_stats_u *stats;
        struct bfa_dma_s stats_dma;
        bfa_boolean_t   endis_pending;
index 45df3282091130752abcd265f82c2801f95d0a59..f56ed871bb9931026aba9137bb9957eb346ef812 100644 (file)
@@ -125,10 +125,10 @@ struct bfa_auth_attr_s {
        enum bfa_auth_status    status;
        enum bfa_auth_algo      algo;
        enum bfa_auth_group     dh_grp;
-       u16             rjt_code;
-       u16             rjt_code_exp;
+       enum bfa_auth_rej_code  rjt_code;
+       enum bfa_auth_rej_code_exp rjt_code_exp;
        u8                      secret_set;
-       u8                      resv[7];
+       u8                      resv[3];
 };
 
 #endif /* __BFA_DEFS_AUTH_H__ */
index a07ef4a3cd789f7ae37980825359e1c5778aa5bc..af86a6396439baa217b8978301ae9646c2ec2bc5 100644 (file)
@@ -48,7 +48,7 @@ struct bfa_fcoe_stats_s {
        u64     disc_fcf_unavail; /*  Discovery FCF not avail        */
        u64     linksvc_unsupp; /*  FIP link service req unsupp.    */
        u64     linksvc_err;    /*  FIP link service req errors     */
-       u64     logo_req;       /*  FIP logo                         */
+       u64     logo_req;       /*  FIP logos received                       */
        u64     clrvlink_req;   /*  Clear virtual link requests     */
        u64     op_unsupp;      /*  FIP operation unsupp.            */
        u64     untagged;       /*  FIP untagged frames      */
@@ -64,21 +64,15 @@ struct bfa_fcoe_stats_s {
        u64     txf_timeout;    /*  Tx timeouts              */
        u64     txf_parity_errors; /*  Transmit parity err           */
        u64     txf_fid_parity_errors; /*  Transmit FID parity err  */
-       u64     tx_pause;       /*  Tx pause frames                  */
-       u64     tx_zero_pause;  /*  Tx zero pause frames             */
-       u64     tx_first_pause; /*  Tx first pause frames            */
-       u64     rx_pause;       /*  Rx pause frames                  */
-       u64     rx_zero_pause;  /*  Rx zero pause frames             */
-       u64     rx_first_pause; /*  Rx first pause frames            */
-       u64     rxf_ucast_octets; /*  Rx unicast octets      */
-       u64     rxf_ucast;      /*  Rx unicast frames                */
-       u64     rxf_ucast_vlan; /*  Rx unicast vlan frames           */
-       u64     rxf_mcast_octets; /*  Rx multicast octets            */
-       u64     rxf_mcast;      /*  Rx multicast frames      */
-       u64     rxf_mcast_vlan; /*  Rx multicast vlan frames         */
-       u64     rxf_bcast_octets; /*  Rx broadcast octests           */
-       u64     rxf_bcast;      /*  Rx broadcast frames      */
-       u64     rxf_bcast_vlan; /*  Rx broadcast vlan frames         */
+       u64     rxf_ucast_octets; /* Rx FCoE unicast octets        */
+       u64     rxf_ucast;      /* Rx FCoE unicast frames          */
+       u64     rxf_ucast_vlan; /* Rx FCoE unicast vlan frames     */
+       u64     rxf_mcast_octets; /* Rx FCoE multicast octets      */
+       u64     rxf_mcast;      /* Rx FCoE multicast frames        */
+       u64     rxf_mcast_vlan; /* Rx FCoE multicast vlan frames   */
+       u64     rxf_bcast_octets; /* Rx FCoE broadcast octets      */
+       u64     rxf_bcast;      /* Rx FCoE broadcast frames        */
+       u64     rxf_bcast_vlan; /* Rx FCoE broadcast vlan frames   */
 };
 
 /**
index c290fb13d2d124921aa4f2c5c106d5ecc4d68e2e..31e728a631ed29053f6d9da197406441c5255b9f 100644 (file)
@@ -51,8 +51,10 @@ struct bfa_iocfc_fwcfg_s {
        u16        num_tsktm_reqs;      /*  TM task management requests*/
        u16        num_fcxp_reqs;       /*  unassisted FC exchanges     */
        u16        num_uf_bufs; /*  unsolicited recv buffers    */
-       u8              num_cqs;
-       u8              rsvd[5];
+       u8         num_cqs;
+       u8         fw_tick_res;    /*!< FW clock resolution in ms */
+       u8         rsvd[4];
+
 };
 
 struct bfa_iocfc_drvcfg_s {
@@ -176,10 +178,10 @@ struct bfa_fw_port_fpg_stats_s {
     u32    nos_rx;
     u32    lip_rx;
     u32    arbf0_rx;
+    u32    arb_rx;
     u32    mrk_rx;
     u32    const_mrk_rx;
     u32    prim_unknown;
-    u32    rsvd;
 };
 
 
@@ -200,6 +202,8 @@ struct bfa_fw_port_lksm_stats_s {
     u32    lrr_tx;             /*  No. of times LRR tx started         */
     u32    ols_tx;             /*  No. of times OLS tx started         */
     u32    nos_tx;             /*  No. of times NOS tx started         */
+    u32    hwsm_lrr_rx;        /*  No. of times LRR rx-ed by HWSM      */
+    u32    hwsm_lr_rx;         /* No. of times LR rx-ed by HWSM        */
 };
 
 
@@ -239,7 +243,7 @@ struct bfa_fw_fip_stats_s {
     u32    disc_fcf_unavail;   /*  Discovery FCF Not Avail.            */
     u32    linksvc_unsupp;     /*  Unsupported link service req        */
     u32    linksvc_err;        /*  Parse error in link service req     */
-    u32    logo_req;           /*  Number of FIP logos received        */
+    u32    logo_req;           /*  FIP logos received                 */
     u32    clrvlink_req;       /*  Clear virtual link req              */
     u32    op_unsupp;          /*  Unsupported FIP operation           */
     u32    untagged;           /*  Untagged frames (ignored)           */
index 2ec769903d24bdbecab39cfcb23b51069e20e780..d77788b3999ae647f6630548dbdc55d51881e4fb 100644 (file)
@@ -34,6 +34,15 @@ enum bfa_itnim_state {
        BFA_ITNIM_INITIATIOR    = 7,    /*  initiator */
 };
 
+struct bfa_itnim_latency_s {
+       u32     min;
+       u32     max;
+       u32     count;
+       u32     clock_res;
+       u32     avg;
+       u32     rsvd;
+};
+
 struct bfa_itnim_hal_stats_s {
        u32     onlines;        /*  ITN nexus onlines (PRLI done) */
        u32     offlines;       /*  ITN Nexus offlines  */
@@ -91,6 +100,7 @@ struct bfa_itnim_attr_s {
        u8      task_retry_id;  /*  task retry ident support   */
        u8 rec_support;    /*  REC supported              */
        u8 conf_comp;      /*  confirmed completion supp  */
+       struct bfa_itnim_latency_s  io_latency; /* IO latency  */
 };
 
 /**
index 752a81293d5a39fc91c312e65d98fe0aadb50624..ebdf0d1731a444d96ea50fec2c8ff311299eed99 100644 (file)
@@ -159,7 +159,7 @@ struct bfa_port_stats_s {
        u32        ms_plogi_rsp_err;
        u32        ms_plogi_acc_err;
        u32        ms_plogi_accepts;
-       u32        ms_rejects;  /* NS command rejects */
+       u32        ms_rejects;  /* MS command rejects */
        u32        ms_plogi_unknown_rsp;
        u32        ms_plogi_alloc_wait;
 
index de6181cf9677711214895933444183167845155f..2c2cec5ee27826f4bc92948e34fb92b73fcc29fc 100644 (file)
@@ -246,7 +246,7 @@ struct bfa_pport_fc_stats_s {
        u64    secs_reset; /* Seconds since stats is reset     */
        u64    tx_frames;  /* Tx frames                */
        u64    tx_words;   /* Tx words                 */
-       u64    tx_lip;     /* TX LIP               */
+       u64    tx_lip;     /* Tx LIP               */
        u64    tx_nos;     /* Tx NOS               */
        u64    tx_ols;     /* Tx OLS               */
        u64    tx_lr;      /* Tx LR                */
@@ -312,7 +312,7 @@ struct bfa_pport_eth_stats_s {
        u64    rx_zero_pause;    /* Rx zero pause              */
        u64    tx_pause;     /* Tx pause               */
        u64    tx_zero_pause;    /* Tx zero pause              */
-       u64    rx_fcoe_pause;    /* Rx fcoe pause              */
+       u64    rx_fcoe_pause;    /* Rx FCoE pause              */
        u64    rx_fcoe_zero_pause; /* Rx FCoE zero pause       */
        u64    tx_fcoe_pause;    /* Tx FCoE pause              */
        u64    tx_fcoe_zero_pause; /* Tx FCoE zero pause       */
index 819db5abf461cc845c58af10d065c4e571f622c6..7cef900707c580292e5070db7b2b8a9770179d12 100644 (file)
@@ -84,8 +84,9 @@ enum bfa_status {
        BFA_STATUS_BADFRMHDR    = 48,   /*  Bad frame header */
        BFA_STATUS_BADFRMSZ     = 49,   /*  Bad frame size check and replace
                                         * SFP/cable */
-       BFA_STATUS_MISSINGFRM   = 50,   /*  Missing frame check and replace
-                                        * SFP/cable */
+       BFA_STATUS_MISSINGFRM   = 50,   /* Missing frame check and replace
+                                        * SFP/cable or for Mezz card check and
+                                        * replace pass through module */
        BFA_STATUS_LINKTIMEOUT  = 51,   /*  Link timeout check and replace
                                         * SFP/cable */
        BFA_STATUS_NO_FCPIM_NEXUS = 52, /*  No FCP Nexus exists with the
@@ -173,7 +174,7 @@ enum bfa_status {
        BFA_STATUS_LEDTEST_OP = 109, /*  LED test is operating */
        BFA_STATUS_CEE_NOT_DN = 110, /*  eth port is not at down state, please
                                      * bring down first */
-       BFA_STATUS_10G_SPD = 111, /*  Speed setting not valid for 10G HBA */
+       BFA_STATUS_10G_SPD = 111, /*  Speed setting not valid for 10G CNA */
        BFA_STATUS_IM_INV_TEAM_NAME = 112, /*  Invalid team name */
        BFA_STATUS_IM_DUP_TEAM_NAME = 113, /*  Given team name already
                                            * exists */
@@ -215,11 +216,11 @@ enum bfa_status {
        BFA_STATUS_BAD_ASICBLK = 132, /*  Bad ASIC block */
        BFA_STATUS_NO_DRIVER = 133, /*  Brocade adapter/driver not installed
                                     *  or loaded */
-       BFA_STATUS_INVALID_MAC = 134, /*  Invalid mac address */
+       BFA_STATUS_INVALID_MAC = 134, /*  Invalid MAC address */
        BFA_STATUS_IM_NO_VLAN = 135, /*  No VLANs configured on the adapter */
        BFA_STATUS_IM_ETH_LB_FAILED = 136, /*  Ethernet loopback test failed */
-       BFA_STATUS_IM_PVID_REMOVE = 137, /*  Cannot remove port vlan (PVID) */
-       BFA_STATUS_IM_PVID_EDIT = 138, /*  Cannot edit port vlan (PVID) */
+       BFA_STATUS_IM_PVID_REMOVE = 137, /* Cannot remove port VLAN (PVID) */
+       BFA_STATUS_IM_PVID_EDIT = 138, /* Cannot edit port VLAN (PVID) */
        BFA_STATUS_CNA_NO_BOOT = 139, /*  Boot upload not allowed for CNA */
        BFA_STATUS_IM_PVID_NON_ZERO = 140, /*  Port VLAN ID (PVID) is Set to
                                            * Non-Zero Value */
@@ -233,14 +234,15 @@ enum bfa_status {
        BFA_STATUS_INSUFFICIENT_PERMS = 144, /*  User doesn't have sufficient
                                              * permissions to execute the BCU
                                              * application */
-       BFA_STATUS_IM_INV_VLAN_NAME = 145, /*  Invalid/Reserved Vlan name
+       BFA_STATUS_IM_INV_VLAN_NAME = 145, /* Invalid/Reserved VLAN name
                                            * string. The name is not allowed
-                                           * for the normal Vlans */
+                                           * for the normal VLAN */
        BFA_STATUS_CMD_NOTSUPP_CNA = 146, /*  Command not supported for CNA */
-       BFA_STATUS_IM_PASSTHRU_EDIT = 147, /*  Can not edit passthru vlan id */
-       BFA_STATUS_IM_BIND_FAILED = 148, /*! < IM Driver bind operation
+       BFA_STATUS_IM_PASSTHRU_EDIT = 147, /* Can not edit passthrough VLAN
+                                           * id */
+       BFA_STATUS_IM_BIND_FAILED = 148, /* IM Driver bind operation
                                          * failed */
-       BFA_STATUS_IM_UNBIND_FAILED = 149, /* ! < IM Driver unbind operation
+       BFA_STATUS_IM_UNBIND_FAILED = 149, /* IM Driver unbind operation
                                            * failed */
        BFA_STATUS_IM_PORT_IN_TEAM = 150, /*  Port is already part of the
                                           * team */
index 5e8c8dee6c97dc946d716eb57a0bee1d4d6436e5..e776bcb496043ab70f45370ca30e77fb7fbc5856 100644 (file)
@@ -157,6 +157,7 @@ bfa_fcs_port_ms_sm_plogi(struct bfa_fcs_port_ms_s *ms, enum port_ms_event event)
                 * Start timer for a delayed retry
                 */
                bfa_sm_set_state(ms, bfa_fcs_port_ms_sm_plogi_retry);
+               ms->port->stats.ms_retries++;
                bfa_timer_start(BFA_FCS_GET_HAL_FROM_PORT(ms->port), &ms->timer,
                                bfa_fcs_port_ms_timeout, ms,
                                BFA_FCS_RETRY_TIMEOUT);
@@ -279,6 +280,7 @@ bfa_fcs_port_ms_sm_gmal(struct bfa_fcs_port_ms_s *ms, enum port_ms_event event)
                 */
                if (ms->retry_cnt++ < BFA_FCS_MS_CMD_MAX_RETRIES) {
                        bfa_sm_set_state(ms, bfa_fcs_port_ms_sm_gmal_retry);
+                       ms->port->stats.ms_retries++;
                        bfa_timer_start(BFA_FCS_GET_HAL_FROM_PORT(ms->port),
                                        &ms->timer, bfa_fcs_port_ms_timeout, ms,
                                        BFA_FCS_RETRY_TIMEOUT);
@@ -479,6 +481,7 @@ bfa_fcs_port_ms_sm_gfn(struct bfa_fcs_port_ms_s *ms, enum port_ms_event event)
                 */
                if (ms->retry_cnt++ < BFA_FCS_MS_CMD_MAX_RETRIES) {
                        bfa_sm_set_state(ms, bfa_fcs_port_ms_sm_gfn_retry);
+                       ms->port->stats.ms_retries++;
                        bfa_timer_start(BFA_FCS_GET_HAL_FROM_PORT(ms->port),
                                        &ms->timer, bfa_fcs_port_ms_timeout, ms,
                                        BFA_FCS_RETRY_TIMEOUT);