]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
net: ethernet: update drivers to make both SW and HW TX timestamps
[karo-tx-linux.git] / drivers / net / ethernet / stmicro / stmmac / stmmac_main.c
index cd8c601323905a7ded2504fa69faa54a1c728066..27c12e732a8ac7ad066698ebbc21428ef93fc41e 100644 (file)
@@ -644,6 +644,7 @@ static int stmmac_hwtstamp_ioctl(struct net_device *dev, struct ifreq *ifr)
                        ptp_over_ethernet = PTP_TCR_TSIPENA;
                        break;
 
+               case HWTSTAMP_FILTER_NTP_ALL:
                case HWTSTAMP_FILTER_ALL:
                        /* time stamp any incoming packet */
                        config.rx_filter = HWTSTAMP_FILTER_ALL;
@@ -2879,8 +2880,7 @@ static netdev_tx_t stmmac_tso_xmit(struct sk_buff *skb, struct net_device *dev)
                priv->xstats.tx_set_ic_bit++;
        }
 
-       if (!priv->hwts_tx_en)
-               skb_tx_timestamp(skb);
+       skb_tx_timestamp(skb);
 
        if (unlikely((skb_shinfo(skb)->tx_flags & SKBTX_HW_TSTAMP) &&
                     priv->hwts_tx_en)) {
@@ -3083,8 +3083,7 @@ static netdev_tx_t stmmac_xmit(struct sk_buff *skb, struct net_device *dev)
                priv->xstats.tx_set_ic_bit++;
        }
 
-       if (!priv->hwts_tx_en)
-               skb_tx_timestamp(skb);
+       skb_tx_timestamp(skb);
 
        /* Ready to fill the first descriptor and set the OWN bit w/o any
         * problems because all the descriptors are actually ready to be
@@ -3725,7 +3724,7 @@ static void sysfs_display_ring(void *head, int size, int extend_desc,
                        ep++;
                } else {
                        seq_printf(seq, "%d [0x%x]: 0x%x 0x%x 0x%x 0x%x\n",
-                                  i, (unsigned int)virt_to_phys(ep),
+                                  i, (unsigned int)virt_to_phys(p),
                                   le32_to_cpu(p->des0), le32_to_cpu(p->des1),
                                   le32_to_cpu(p->des2), le32_to_cpu(p->des3));
                        p++;