aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Cochran <richardcochran@gmail.com>2011-06-19 17:51:25 -0400
committerDavid S. Miller <davem@davemloft.net>2011-06-20 16:56:53 -0400
commit570773c5801cc6c322534d6b1d1551e23664103e (patch)
treea53a9e6e5eec1bff6ed0b4bf89dbd0f834630925
parentd76b7e2faaabae4805ae7ebf31ad64a33268f44f (diff)
emaclite: enable transmit and receive time stamping.
This patch enables software (and phy device) time stamping. Since this MAC uses phylib, adding the hooks make hardware time stamping in the phy possible. Compile tested only. Cc: John Linn <john.linn@xilinx.com> Signed-off-by: Richard Cochran <richard.cochran@omicron.at> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/xilinx_emaclite.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/net/xilinx_emaclite.c b/drivers/net/xilinx_emaclite.c
index 9cb4cdc2859a..039d976ba313 100644
--- a/drivers/net/xilinx_emaclite.c
+++ b/drivers/net/xilinx_emaclite.c
@@ -648,7 +648,8 @@ static void xemaclite_rx_handler(struct net_device *dev)
648 dev->stats.rx_packets++; 648 dev->stats.rx_packets++;
649 dev->stats.rx_bytes += len; 649 dev->stats.rx_bytes += len;
650 650
651 netif_rx(skb); /* Send the packet upstream */ 651 if (!skb_defer_rx_timestamp(skb))
652 netif_rx(skb); /* Send the packet upstream */
652} 653}
653 654
654/** 655/**
@@ -1030,15 +1031,19 @@ static int xemaclite_send(struct sk_buff *orig_skb, struct net_device *dev)
1030 spin_lock_irqsave(&lp->reset_lock, flags); 1031 spin_lock_irqsave(&lp->reset_lock, flags);
1031 if (xemaclite_send_data(lp, (u8 *) new_skb->data, len) != 0) { 1032 if (xemaclite_send_data(lp, (u8 *) new_skb->data, len) != 0) {
1032 /* If the Emaclite Tx buffer is busy, stop the Tx queue and 1033 /* If the Emaclite Tx buffer is busy, stop the Tx queue and
1033 * defer the skb for transmission at a later point when the 1034 * defer the skb for transmission during the ISR, after the
1034 * current transmission is complete */ 1035 * current transmission is complete */
1035 netif_stop_queue(dev); 1036 netif_stop_queue(dev);
1036 lp->deferred_skb = new_skb; 1037 lp->deferred_skb = new_skb;
1038 /* Take the time stamp now, since we can't do this in an ISR. */
1039 skb_tx_timestamp(new_skb);
1037 spin_unlock_irqrestore(&lp->reset_lock, flags); 1040 spin_unlock_irqrestore(&lp->reset_lock, flags);
1038 return 0; 1041 return 0;
1039 } 1042 }
1040 spin_unlock_irqrestore(&lp->reset_lock, flags); 1043 spin_unlock_irqrestore(&lp->reset_lock, flags);
1041 1044
1045 skb_tx_timestamp(new_skb);
1046
1042 dev->stats.tx_bytes += len; 1047 dev->stats.tx_bytes += len;
1043 dev_kfree_skb(new_skb); 1048 dev_kfree_skb(new_skb);
1044 1049