aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wan
diff options
context:
space:
mode:
authorDavid Gounaris <david.gounaris@infinera.com>2018-09-03 14:47:30 +0200
committerDavid S. Miller <davem@davemloft.net>2018-09-03 22:14:41 -0700
commitccb7bc0edd9979b57d2f0becf4d4c7ec62b7202d (patch)
tree98e311e74be9c77c2de241876d15cd93e0c9438b /drivers/net/wan
parentnet/wan/fsl_ucc_hdlc: GUMR for non tsa mode (diff)
downloadlinux-dev-ccb7bc0edd9979b57d2f0becf4d4c7ec62b7202d.tar.xz
linux-dev-ccb7bc0edd9979b57d2f0becf4d4c7ec62b7202d.zip
net/wan/fsl_ucc_hdlc: tx timeout handler
Added tx timeout handler. This helps when troubleshooting. Signed-off-by: David Gounaris <david.gounaris@infinera.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/wan')
-rw-r--r--drivers/net/wan/fsl_ucc_hdlc.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/net/wan/fsl_ucc_hdlc.c b/drivers/net/wan/fsl_ucc_hdlc.c
index 4545c782ef4e..8523ade16030 100644
--- a/drivers/net/wan/fsl_ucc_hdlc.c
+++ b/drivers/net/wan/fsl_ucc_hdlc.c
@@ -999,11 +999,17 @@ static const struct dev_pm_ops uhdlc_pm_ops = {
#define HDLC_PM_OPS NULL
#endif
+static void uhdlc_tx_timeout(struct net_device *ndev)
+{
+ netdev_err(ndev, "%s\n", __func__);
+}
+
static const struct net_device_ops uhdlc_ops = {
.ndo_open = uhdlc_open,
.ndo_stop = uhdlc_close,
.ndo_start_xmit = hdlc_start_xmit,
.ndo_do_ioctl = uhdlc_ioctl,
+ .ndo_tx_timeout = uhdlc_tx_timeout,
};
static int ucc_hdlc_probe(struct platform_device *pdev)
@@ -1122,6 +1128,7 @@ static int ucc_hdlc_probe(struct platform_device *pdev)
hdlc = dev_to_hdlc(dev);
dev->tx_queue_len = 16;
dev->netdev_ops = &uhdlc_ops;
+ dev->watchdog_timeo = 2 * HZ;
hdlc->attach = ucc_hdlc_attach;
hdlc->xmit = ucc_hdlc_tx;
netif_napi_add(dev, &uhdlc_priv->napi, ucc_hdlc_poll, 32);