diff options
author | Sudarsana Reddy Kalluru <skalluru@marvell.com> | 2019-05-27 20:21:33 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-05-29 00:01:30 -0700 |
commit | 9adebac37e7d26c5cd73776a0279574afe3f410b (patch) | |
tree | de67505141d52178f9d6ba8bf50c6aa062a6a321 /drivers/net/ethernet/qlogic/qede/qede_main.c | |
parent | qed: Reduce the severity of ptp debug message. (diff) | |
download | linux-dev-9adebac37e7d26c5cd73776a0279574afe3f410b.tar.xz linux-dev-9adebac37e7d26c5cd73776a0279574afe3f410b.zip |
qede: Handle infinite driver spinning for Tx timestamp.
In PTP Tx implementation, driver kept scheduling a poll thread until the
timestamp is available. In the error scenarios (e.g. app requesting the
timestamp for non-ptp packet), this thread kept waiting for the timestamp
forever. This patch add changes to report such scenario as an error and
terminate the thread. Added a timeout of 2 seconds i.e., max time to wait
for Tx timestamp. Added a stat value ptp_skip_txts for reporting the number
of packets for which Tx timestamping is skipped.
Signed-off-by: Sudarsana Reddy Kalluru <skalluru@marvell.com>
Signed-off-by: Michal Kalderon <mkalderon@marvell.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rw-r--r-- | drivers/net/ethernet/qlogic/qede/qede_main.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/ethernet/qlogic/qede/qede_main.c b/drivers/net/ethernet/qlogic/qede/qede_main.c index a9684a881f2a..741377b7c00d 100644 --- a/drivers/net/ethernet/qlogic/qede/qede_main.c +++ b/drivers/net/ethernet/qlogic/qede/qede_main.c @@ -390,6 +390,7 @@ void qede_fill_by_demand_stats(struct qede_dev *edev) p_common->brb_discards = stats.common.brb_discards; p_common->tx_mac_ctrl_frames = stats.common.tx_mac_ctrl_frames; p_common->link_change_count = stats.common.link_change_count; + p_common->ptp_skip_txts = edev->ptp_skip_txts; if (QEDE_IS_BB(edev)) { struct qede_stats_bb *p_bb = &edev->stats.bb; @@ -2232,6 +2233,8 @@ out: if (mode != QEDE_UNLOAD_RECOVERY) DP_NOTICE(edev, "Link is down\n"); + edev->ptp_skip_txts = 0; + DP_INFO(edev, "Ending qede unload\n"); } |