/* 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 emac_priv *priv)
/* 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 emac_priv *priv)
{
    rt_kprintf("emac tx timeout.\n");
    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);
}