|
@@ -1600,6 +1600,14 @@ static int xgbe_change_mtu(struct net_device *netdev, int mtu)
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
+static void xgbe_tx_timeout(struct net_device *netdev)
|
|
|
+{
|
|
|
+ struct xgbe_prv_data *pdata = netdev_priv(netdev);
|
|
|
+
|
|
|
+ netdev_warn(netdev, "tx timeout, device restarting\n");
|
|
|
+ schedule_work(&pdata->restart_work);
|
|
|
+}
|
|
|
+
|
|
|
static struct rtnl_link_stats64 *xgbe_get_stats64(struct net_device *netdev,
|
|
|
struct rtnl_link_stats64 *s)
|
|
|
{
|
|
@@ -1764,6 +1772,7 @@ static const struct net_device_ops xgbe_netdev_ops = {
|
|
|
.ndo_validate_addr = eth_validate_addr,
|
|
|
.ndo_do_ioctl = xgbe_ioctl,
|
|
|
.ndo_change_mtu = xgbe_change_mtu,
|
|
|
+ .ndo_tx_timeout = xgbe_tx_timeout,
|
|
|
.ndo_get_stats64 = xgbe_get_stats64,
|
|
|
.ndo_vlan_rx_add_vid = xgbe_vlan_rx_add_vid,
|
|
|
.ndo_vlan_rx_kill_vid = xgbe_vlan_rx_kill_vid,
|