Le vendredi 21 janvier 2011 à 15:55 +0800, Po-Yu Chuang a écrit :
From: Po-Yu Chuang <redacted>
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 <redacted>
quoted hunk ↗ jump to hunk
+
+static bool ftmac100_tx_complete_packet(struct ftmac100 *priv)
+{
...
quoted hunk ↗ jump to hunk
+
+ 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()