]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
Merge remote-tracking branch 'input-current/for-linus'
[karo-tx-linux.git] / drivers / net / ethernet / stmicro / stmmac / stmmac_main.c
index 925f2f8659b8f181fc9a447329180cbc4a12a5e9..64d8aa4e0cad6420bcb1fa4cd827ad823ba3601d 100644 (file)
@@ -424,7 +424,7 @@ static int stmmac_hwtstamp_ioctl(struct net_device *dev, struct ifreq *ifr)
 {
        struct stmmac_priv *priv = netdev_priv(dev);
        struct hwtstamp_config config;
-       struct timespec now;
+       struct timespec64 now;
        u64 temp = 0;
        u32 ptp_v2 = 0;
        u32 tstamp_all = 0;
@@ -621,8 +621,10 @@ static int stmmac_hwtstamp_ioctl(struct net_device *dev, struct ifreq *ifr)
                                             priv->default_addend);
 
                /* initialize system time */
-               getnstimeofday(&now);
-               priv->hw->ptp->init_systime(priv->ioaddr, now.tv_sec,
+               ktime_get_real_ts64(&now);
+
+               /* lower 32 bits of tv_sec are safe until y2106 */
+               priv->hw->ptp->init_systime(priv->ioaddr, (u32)now.tv_sec,
                                            now.tv_nsec);
        }
 
@@ -1945,7 +1947,7 @@ static netdev_tx_t stmmac_xmit(struct sk_buff *skb, struct net_device *dev)
 {
        struct stmmac_priv *priv = netdev_priv(dev);
        unsigned int txsize = priv->dma_tx_size;
-       unsigned int entry;
+       int entry;
        int i, csum_insertion = 0, is_jumbo = 0;
        int nfrags = skb_shinfo(skb)->nr_frags;
        struct dma_desc *desc, *first;