Re: [PATCH v4] net: add Faraday FTMAC100 10/100 Ethernet driver

From: Eric Dumazet
Date: Fri Jan 21 2011 - 04:08:22 EST


Le vendredi 21 janvier 2011 Ã 15:55 +0800, Po-Yu Chuang a Ãcrit :
> From: Po-Yu Chuang <ratbert@xxxxxxxxxxxxxxxx>
>
> FTMAC100 Ethernet Media Access Controller supports 10/100 Mbps and
> MII. This driver has been working on some ARM/NDS32 SoC's including
> Faraday A320 and Andes AG101.
>
> Signed-off-by: Po-Yu Chuang <ratbert@xxxxxxxxxxxxxxxx>


> +
> +static bool ftmac100_tx_complete_packet(struct ftmac100 *priv)
> +{
...
> +
> + dma_unmap_single(priv->dev, map, skb_headlen(skb), DMA_TO_DEVICE);
> +
> + dev_kfree_skb_irq(skb);
> +
> + ftmac100_txdes_reset(txdes);
> +
> + ftmac100_tx_clean_pointer_advance(priv);
> +
> + priv->tx_pending--;
> + netif_wake_queue(netdev);
> +
> + return true;
> +}
> +

Thanks to NAPI, you can free skb directly, not queuing it via
NET_TX_SOFTIRQ softirq, using dev_kfree_skb() instead of
dev_kfree_skb_irq()



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/