/* Called when system detects that a skb timeout period has expired potentially due to a fault in the adapter in not being able to send it out on the wire. We teardown the TX channel assuming a hardware error and re-initialize the TX channel for hardware operation  */
static void emac_dev_tx_timeout(struct net_device *ndev)
/* Called when system detects that a skb timeout period has expired potentially due to a fault in the adapter in not being able to send it out on the wire. We teardown the TX channel assuming a hardware error and re-initialize the TX channel for hardware operation  */
static void emac_dev_tx_timeout(struct net_device *ndev)
{
	struct emac_priv *priv = netdev_priv(ndev);
	struct device *emac_dev = &ndev->dev;
	if (netif_msg_tx_err(priv))
		dev_err(emac_dev, "DaVinci EMAC: xmit timeout, restarting TX");
	priv->net_dev_stats.tx_errors++;
	emac_int_disable(priv);
	emac_stop_txch(priv, EMAC_DEF_TX_CH);
	emac_cleanup_txch(priv, EMAC_DEF_TX_CH);
	emac_init_txch(priv, EMAC_DEF_TX_CH);
	emac_write(EMAC_TXHDP(0), 0);
	emac_write(EMAC_TXINTMASKSET, BIT(EMAC_DEF_TX_CH));
	emac_int_enable(priv);
}