[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <AM6PR0702MB3639888440F0AC658E31FE25DF2D0@AM6PR0702MB3639.eurprd07.prod.outlook.com>
Date: Fri, 20 Dec 2019 12:56:50 +0000
From: Timofey Babitskiy <timofey.babitskiy@...dulum-instruments.com>
To: "netdev@...r.kernel.org" <netdev@...r.kernel.org>
CC: Giuseppe Cavallaro <peppe.cavallaro@...com>,
"alexandre.torgue@...com" <alexandre.torgue@...com>,
Jose Abreu <joabreu@...opsys.com>
Subject: [PATCH] stmmac: export RX mitigation control to device tree
Having Rx mitigation via HW watchdog timer on is not suitable for time
servers distributing time via NTP and PTP protocol and relying on SW
timestamping, because Rx mitigation adds latency on receive and hence adds
path delay assymetry, which leads to time offset on timing clients. Turning
Rx mitigation off via platform config is not always a good option, because
some systems use default platform configs and only tune the device tree.
Signed-off-by: Timofey Babitskiy <timofey.babitskiy@...dulum-instruments.com>
---
Documentation/devicetree/bindings/net/snps,dwmac.yaml | 5 +++++
drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c | 3 +++
2 files changed, 8 insertions(+)
diff --git a/Documentation/devicetree/bindings/net/snps,dwmac.yaml b/Documentation/devicetree/bindings/net/snps,dwmac.yaml
index 4845e29411e4..b4a8d3e92b44 100644
--- a/Documentation/devicetree/bindings/net/snps,dwmac.yaml
+++ b/Documentation/devicetree/bindings/net/snps,dwmac.yaml
@@ -258,6 +258,11 @@ properties:
is supported. For example, this is used in case of SGMII and
MAC2MAC connection.
+ snps,riwt-off:
+ $ref: /schemas/types.yaml#definitions/flag
+ description:
+ Disables RX IRQ Mitigation via HW Watchdog Timer.
+
mdio:
type: object
description:
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
index bedaff0c13bd..42b2f99d8c90 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
@@ -465,6 +465,9 @@ stmmac_probe_config_dt(struct platform_device *pdev, const char **mac)
plat->en_tx_lpi_clockgating =
of_property_read_bool(np, "snps,en-tx-lpi-clockgating");
+ plat->riwt_off =
+ of_property_read_bool(np, "snps,riwt-off");
+
/* Set the maxmtu to a default of JUMBO_LEN in case the
* parameter is not present in the device tree.
*/
Powered by blists - more mailing lists