|
@@ -1854,6 +1854,11 @@ static void __qed_get_vport_port_stats(struct qed_hwfn *p_hwfn,
|
|
|
p_ah->tx_1519_to_max_byte_packets =
|
|
|
port_stats.eth.u1.ah1.t1519_to_max;
|
|
|
}
|
|
|
+
|
|
|
+ p_common->link_change_count = qed_rd(p_hwfn, p_ptt,
|
|
|
+ p_hwfn->mcp_info->port_addr +
|
|
|
+ offsetof(struct public_port,
|
|
|
+ link_change_count));
|
|
|
}
|
|
|
|
|
|
static void __qed_get_vport_stats(struct qed_hwfn *p_hwfn,
|
|
@@ -1961,11 +1966,14 @@ void qed_reset_vport_stats(struct qed_dev *cdev)
|
|
|
|
|
|
/* PORT statistics are not necessarily reset, so we need to
|
|
|
* read and create a baseline for future statistics.
|
|
|
+ * Link change stat is maintained by MFW, return its value as is.
|
|
|
*/
|
|
|
- if (!cdev->reset_stats)
|
|
|
+ if (!cdev->reset_stats) {
|
|
|
DP_INFO(cdev, "Reset stats not allocated\n");
|
|
|
- else
|
|
|
+ } else {
|
|
|
_qed_get_vport_stats(cdev, cdev->reset_stats);
|
|
|
+ cdev->reset_stats->common.link_change_count = 0;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
static enum gft_profile_type
|