treewide: replace dev->trans_start update with helper
authorFlorian Westphal <fw@strlen.de>
Tue, 3 May 2016 14:33:13 +0000 (16:33 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 4 May 2016 18:16:49 +0000 (14:16 -0400)
Replace all trans_start updates with netif_trans_update helper.
change was done via spatch:

struct net_device *d;
@@
- d->trans_start = jiffies
+ netif_trans_update(d)

Compile tested only.

Cc: user-mode-linux-devel@lists.sourceforge.net
Cc: linux-xtensa@linux-xtensa.org
Cc: linux1394-devel@lists.sourceforge.net
Cc: linux-rdma@vger.kernel.org
Cc: netdev@vger.kernel.org
Cc: MPT-FusionLinux.pdl@broadcom.com
Cc: linux-scsi@vger.kernel.org
Cc: linux-can@vger.kernel.org
Cc: linux-parisc@vger.kernel.org
Cc: linux-omap@vger.kernel.org
Cc: linux-hams@vger.kernel.org
Cc: linux-usb@vger.kernel.org
Cc: linux-wireless@vger.kernel.org
Cc: linux-s390@vger.kernel.org
Cc: devel@driverdev.osuosl.org
Cc: b.a.t.m.a.n@lists.open-mesh.org
Cc: linux-bluetooth@vger.kernel.org
Signed-off-by: Florian Westphal <fw@strlen.de>
Acked-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Acked-by: Mugunthan V N <mugunthanvnm@ti.com>
Acked-by: Antonio Quartulli <a@unstable.cc>
Signed-off-by: David S. Miller <davem@davemloft.net>
156 files changed:
arch/um/drivers/net_kern.c
arch/xtensa/platforms/iss/network.c
drivers/char/pcmcia/synclink_cs.c
drivers/firewire/net.c
drivers/infiniband/hw/nes/nes_nic.c
drivers/infiniband/ulp/ipoib/ipoib_cm.c
drivers/infiniband/ulp/ipoib/ipoib_ib.c
drivers/isdn/hysdn/hysdn_net.c
drivers/isdn/i4l/isdn_net.c
drivers/isdn/i4l/isdn_x25iface.c
drivers/message/fusion/mptlan.c
drivers/net/appletalk/cops.c
drivers/net/can/mscan/mscan.c
drivers/net/can/usb/ems_usb.c
drivers/net/can/usb/esd_usb2.c
drivers/net/can/usb/peak_usb/pcan_usb_core.c
drivers/net/cris/eth_v10.c
drivers/net/ethernet/3com/3c509.c
drivers/net/ethernet/3com/3c515.c
drivers/net/ethernet/3com/3c574_cs.c
drivers/net/ethernet/3com/3c589_cs.c
drivers/net/ethernet/3com/3c59x.c
drivers/net/ethernet/8390/axnet_cs.c
drivers/net/ethernet/8390/lib8390.c
drivers/net/ethernet/adaptec/starfire.c
drivers/net/ethernet/adi/bfin_mac.c
drivers/net/ethernet/agere/et131x.c
drivers/net/ethernet/allwinner/sun4i-emac.c
drivers/net/ethernet/amd/7990.c
drivers/net/ethernet/amd/a2065.c
drivers/net/ethernet/amd/atarilance.c
drivers/net/ethernet/amd/au1000_eth.c
drivers/net/ethernet/amd/declance.c
drivers/net/ethernet/amd/lance.c
drivers/net/ethernet/amd/ni65.c
drivers/net/ethernet/amd/nmclan_cs.c
drivers/net/ethernet/amd/pcnet32.c
drivers/net/ethernet/amd/sunlance.c
drivers/net/ethernet/atheros/alx/main.c
drivers/net/ethernet/broadcom/bcmsysport.c
drivers/net/ethernet/broadcom/genet/bcmgenet.c
drivers/net/ethernet/broadcom/sb1250-mac.c
drivers/net/ethernet/broadcom/tg3.c
drivers/net/ethernet/cavium/liquidio/lio_main.c
drivers/net/ethernet/cavium/octeon/octeon_mgmt.c
drivers/net/ethernet/cavium/thunder/nicvf_main.c
drivers/net/ethernet/chelsio/cxgb4vf/sge.c
drivers/net/ethernet/davicom/dm9000.c
drivers/net/ethernet/dec/tulip/de4x5.c
drivers/net/ethernet/dec/tulip/dmfe.c
drivers/net/ethernet/dec/tulip/pnic.c
drivers/net/ethernet/dec/tulip/tulip_core.c
drivers/net/ethernet/dec/tulip/uli526x.c
drivers/net/ethernet/dec/tulip/winbond-840.c
drivers/net/ethernet/dlink/dl2k.c
drivers/net/ethernet/dlink/sundance.c
drivers/net/ethernet/fealnx.c
drivers/net/ethernet/freescale/gianfar.c
drivers/net/ethernet/fujitsu/fmvj18x_cs.c
drivers/net/ethernet/hisilicon/hix5hd2_gmac.c
drivers/net/ethernet/hisilicon/hns/hns_enet.c
drivers/net/ethernet/hp/hp100.c
drivers/net/ethernet/i825xx/82596.c
drivers/net/ethernet/i825xx/lib82596.c
drivers/net/ethernet/i825xx/sun3_82586.c
drivers/net/ethernet/ibm/emac/core.c
drivers/net/ethernet/intel/fm10k/fm10k_pci.c
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
drivers/net/ethernet/korina.c
drivers/net/ethernet/lantiq_etop.c
drivers/net/ethernet/marvell/pxa168_eth.c
drivers/net/ethernet/marvell/sky2.c
drivers/net/ethernet/micrel/ksz884x.c
drivers/net/ethernet/microchip/encx24j600.c
drivers/net/ethernet/moxa/moxart_ether.c
drivers/net/ethernet/natsemi/natsemi.c
drivers/net/ethernet/natsemi/sonic.c
drivers/net/ethernet/nuvoton/w90p910_ether.c
drivers/net/ethernet/packetengines/hamachi.c
drivers/net/ethernet/packetengines/yellowfin.c
drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c
drivers/net/ethernet/qualcomm/qca_spi.c
drivers/net/ethernet/realtek/atp.c
drivers/net/ethernet/seeq/sgiseeq.c
drivers/net/ethernet/sgi/meth.c
drivers/net/ethernet/sis/sis900.c
drivers/net/ethernet/smsc/epic100.c
drivers/net/ethernet/smsc/smc911x.c
drivers/net/ethernet/smsc/smc9194.c
drivers/net/ethernet/smsc/smc91c92_cs.c
drivers/net/ethernet/smsc/smc91x.c
drivers/net/ethernet/sun/niu.c
drivers/net/ethernet/sun/sungem.c
drivers/net/ethernet/synopsys/dwc_eth_qos.c
drivers/net/ethernet/tehuti/tehuti.c
drivers/net/ethernet/ti/cpsw.c
drivers/net/ethernet/ti/netcp_core.c
drivers/net/ethernet/ti/tlan.c
drivers/net/ethernet/tile/tilepro.c
drivers/net/ethernet/toshiba/spider_net.c
drivers/net/ethernet/via/via-rhine.c
drivers/net/ethernet/wiznet/w5100.c
drivers/net/ethernet/wiznet/w5300.c
drivers/net/ethernet/xilinx/ll_temac_main.c
drivers/net/ethernet/xilinx/xilinx_axienet_main.c
drivers/net/ethernet/xilinx/xilinx_emaclite.c
drivers/net/ethernet/xircom/xirc2ps_cs.c
drivers/net/fjes/fjes_main.c
drivers/net/hamradio/mkiss.c
drivers/net/hamradio/scc.c
drivers/net/hamradio/yam.c
drivers/net/irda/ali-ircc.c
drivers/net/irda/bfin_sir.c
drivers/net/irda/irda-usb.c
drivers/net/irda/nsc-ircc.c
drivers/net/irda/smsc-ircc2.c
drivers/net/irda/stir4200.c
drivers/net/irda/via-ircc.c
drivers/net/slip/slip.c
drivers/net/usb/catc.c
drivers/net/usb/kaweth.c
drivers/net/usb/lan78xx.c
drivers/net/usb/pegasus.c
drivers/net/usb/rtl8150.c
drivers/net/usb/usbnet.c
drivers/net/wan/cosa.c
drivers/net/wan/farsync.c
drivers/net/wan/lmc/lmc_main.c
drivers/net/wan/sbni.c
drivers/net/wimax/i2400m/netdev.c
drivers/net/wireless/cisco/airo.c
drivers/net/wireless/intel/ipw2x00/ipw2100.c
drivers/net/wireless/intel/ipw2x00/ipw2200.c
drivers/net/wireless/intersil/hostap/hostap_hw.c
drivers/net/wireless/intersil/orinoco/main.c
drivers/net/wireless/intersil/orinoco/orinoco_usb.c
drivers/net/wireless/marvell/mwifiex/init.c
drivers/net/wireless/wl3501_cs.c
drivers/net/wireless/zydas/zd1201.c
drivers/s390/net/ctcm_main.c
drivers/s390/net/ctcm_mpc.c
drivers/s390/net/netiucv.c
drivers/staging/rtl8192e/rtl8192e/rtl_core.c
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c
drivers/staging/rtl8192u/r8192U_core.c
drivers/staging/wlan-ng/p80211netdev.c
drivers/tty/n_gsm.c
drivers/tty/synclink.c
drivers/tty/synclink_gt.c
drivers/tty/synclinkmp.c
drivers/usb/gadget/function/u_ether.c
net/atm/lec.c
net/batman-adv/soft-interface.c
net/bluetooth/bnep/netdev.c
net/irda/irlan/irlan_eth.c
net/sched/sch_generic.c

index 9ef669d24bb22098f42ca8bd5253616a54647151..2cd5b6874c7bb65fa75e6f6c686fc72a6d8aff0c 100644 (file)
@@ -223,7 +223,7 @@ static int uml_net_start_xmit(struct sk_buff *skb, struct net_device *dev)
        if (len == skb->len) {
                dev->stats.tx_packets++;
                dev->stats.tx_bytes += skb->len;
-               dev->trans_start = jiffies;
+               netif_trans_update(dev);
                netif_start_queue(dev);
 
                /* this is normally done in the interrupt when tx finishes */
@@ -252,7 +252,7 @@ static void uml_net_set_multicast_list(struct net_device *dev)
 
 static void uml_net_tx_timeout(struct net_device *dev)
 {
-       dev->trans_start = jiffies;
+       netif_trans_update(dev);
        netif_wake_queue(dev);
 }
 
index 976a3859453707b5d2acaa1e7f80b0e81a16a74e..66a5d15a9e0e27b613a0fa4694b46f96aaadf9d1 100644 (file)
@@ -428,7 +428,7 @@ static int iss_net_start_xmit(struct sk_buff *skb, struct net_device *dev)
        if (len == skb->len) {
                lp->stats.tx_packets++;
                lp->stats.tx_bytes += skb->len;
-               dev->trans_start = jiffies;
+               netif_trans_update(dev);
                netif_start_queue(dev);
 
                /* this is normally done in the interrupt when tx finishes */
index 22c27652e46a8dd6851a56edd408e39095eaa4ad..e524e8302da689141f46832d42616ff0c1fcec08 100644 (file)
@@ -3969,7 +3969,7 @@ static netdev_tx_t hdlcdev_xmit(struct sk_buff *skb,
        dev_kfree_skb(skb);
 
        /* save start time for transmit timeout detection */
-       dev->trans_start = jiffies;
+       netif_trans_update(dev);
 
        /* start hardware transmitter if necessary */
        spin_lock_irqsave(&info->lock, flags);
@@ -4032,7 +4032,7 @@ static int hdlcdev_open(struct net_device *dev)
        tty_kref_put(tty);
 
        /* enable network layer transmit */
-       dev->trans_start = jiffies;
+       netif_trans_update(dev);
        netif_start_queue(dev);
 
        /* inform generic HDLC layer of current DCD status */
index f4ea80d602f73bd6bc5adac2a32bbbe2b58de716..309311b1faae18752a9bf24b0d350933aad4627c 100644 (file)
@@ -1023,7 +1023,7 @@ static int fwnet_send_packet(struct fwnet_packet_task *ptask)
 
        spin_unlock_irqrestore(&dev->lock, flags);
 
-       dev->netdev->trans_start = jiffies;
+       netif_trans_update(dev->netdev);
  out:
        if (free)
                fwnet_free_ptask(ptask);
index 77630cad7f813de1795895d62e8e323550b283d1..2b27d1351cf7df44c6803fe79315bf277b071826 100644 (file)
@@ -682,7 +682,7 @@ tso_sq_no_longer_full:
                nes_write32(nesdev->regs+NES_WQE_ALLOC,
                                (wqe_count << 24) | (1 << 23) | nesvnic->nic.qp_id);
 
-       netdev->trans_start = jiffies;
+       netif_trans_update(netdev);
 
        return NETDEV_TX_OK;
 }
index c8ed53562c9b54cfc3fd21ece14ea6b95f94c872..b2f42835d76d51cfed64266d6f884f46de3a11d1 100644 (file)
@@ -766,7 +766,7 @@ void ipoib_cm_send(struct net_device *dev, struct sk_buff *skb, struct ipoib_cm_
                ipoib_dma_unmap_tx(priv, tx_req);
                dev_kfree_skb_any(skb);
        } else {
-               dev->trans_start = jiffies;
+               netif_trans_update(dev);
                ++tx->tx_head;
 
                if (++priv->tx_outstanding == ipoib_sendq_size) {
index f0e55e47eb540c0c5fbf95e5ee00d38df14b9e97..3643d559ba316960716809f93007d00a2d46fe0e 100644 (file)
@@ -637,7 +637,7 @@ void ipoib_send(struct net_device *dev, struct sk_buff *skb,
                if (netif_queue_stopped(dev))
                        netif_wake_queue(dev);
        } else {
-               dev->trans_start = jiffies;
+               netif_trans_update(dev);
 
                address->last_send = priv->tx_head;
                ++priv->tx_head;
index a0efb4cefa1c3ce467b7f9232d27da2dc5fd3565..5609deee7cd3f7891076dd474493bcfa91c7ad87 100644 (file)
@@ -127,7 +127,7 @@ net_send_packet(struct sk_buff *skb, struct net_device *dev)
        if (lp->in_idx >= MAX_SKB_BUFFERS)
                lp->in_idx = 0; /* wrap around */
        lp->sk_count++;         /* adjust counter */
-       dev->trans_start = jiffies;
+       netif_trans_update(dev);
 
        /* If we just used up the very last entry in the
         * TX ring on this device, tell the queueing
index aa5dd5668528912ec1f402deea49951fe8e15ff2..c151c6daa67ee8aa2ae600b4462f146d85776335 100644 (file)
@@ -1153,7 +1153,7 @@ static void isdn_net_tx_timeout(struct net_device *ndev)
                 * ever called   --KG
                 */
        }
-       ndev->trans_start = jiffies;
+       netif_trans_update(ndev);
        netif_wake_queue(ndev);
 }
 
@@ -1291,7 +1291,7 @@ isdn_net_start_xmit(struct sk_buff *skb, struct net_device *ndev)
                        }
                } else {
                        /* Device is connected to an ISDN channel */
-                       ndev->trans_start = jiffies;
+                       netif_trans_update(ndev);
                        if (!lp->dialstate) {
                                /* ISDN connection is established, try sending */
                                int ret;
index e2d4e58230f581c2f1ac7a86f89e44e8fe529f05..0c5d8de41b23ab513fd4e03c51f3c528e06e515d 100644 (file)
@@ -278,7 +278,7 @@ static int isdn_x25iface_xmit(struct concap_proto *cprot, struct sk_buff *skb)
        case X25_IFACE_DATA:
                if (*state == WAN_CONNECTED) {
                        skb_pull(skb, 1);
-                       cprot->net_dev->trans_start = jiffies;
+                       netif_trans_update(cprot->net_dev);
                        ret = (cprot->dops->data_req(cprot, skb));
                        /* prepare for future retransmissions */
                        if (ret) skb_push(skb, 1);
index cbe96072a6cc2619ecd0be52d45a837a7bf69a5c..6955c9e22d571a335864b6c701e40ee32079dfe1 100644 (file)
@@ -791,7 +791,7 @@ mpt_lan_sdu_send (struct sk_buff *skb, struct net_device *dev)
                pSimple->Address.High = 0;
 
        mpt_put_msg_frame (LanCtx, mpt_dev, mf);
-       dev->trans_start = jiffies;
+       netif_trans_update(dev);
 
        dioprintk((KERN_INFO MYNAM ": %s/%s: Sending packet. FlagsLength = %08x.\n",
                        IOC_AND_NETDEV_NAMES_s_s(dev),
index 7f2a032c354c2c210af55c23c72f6ec1fcd9b4ea..1b2e9217ec789a4b338690a9e065d06c1d1b07f5 100644 (file)
@@ -861,7 +861,7 @@ static void cops_timeout(struct net_device *dev)
        }
        printk(KERN_WARNING "%s: Transmit timed out.\n", dev->name);
        cops_jumpstart(dev);    /* Restart the card. */
-       dev->trans_start = jiffies; /* prevent tx timeout */
+       netif_trans_update(dev); /* prevent tx timeout */
        netif_wake_queue(dev);
 }
 
index e36b7400d5cceaf12b416d39a0d546baa52e73a5..acb708fc14636e76959c068ec249682ac64564de 100644 (file)
@@ -276,7 +276,7 @@ static netdev_tx_t mscan_start_xmit(struct sk_buff *skb, struct net_device *dev)
        out_8(&regs->cantflg, 1 << buf_id);
 
        if (!test_bit(F_TX_PROGRESS, &priv->flags))
-               dev->trans_start = jiffies;
+               netif_trans_update(dev);
 
        list_add_tail(&priv->tx_queue[buf_id].list, &priv->tx_head);
 
@@ -469,7 +469,7 @@ static irqreturn_t mscan_isr(int irq, void *dev_id)
                        clear_bit(F_TX_PROGRESS, &priv->flags);
                        priv->cur_pri = 0;
                } else {
-                       dev->trans_start = jiffies;
+                       netif_trans_update(dev);
                }
 
                if (!test_bit(F_TX_WAIT_ALL, &priv->flags))
index 3400fd1cada7152dbd0ad2c5df4626b52c8bd1a0..71f0e791355b9c6e51218c6829a89cbc17ba607f 100644 (file)
@@ -521,7 +521,7 @@ static void ems_usb_write_bulk_callback(struct urb *urb)
        if (urb->status)
                netdev_info(netdev, "Tx URB aborted (%d)\n", urb->status);
 
-       netdev->trans_start = jiffies;
+       netif_trans_update(netdev);
 
        /* transmission complete interrupt */
        netdev->stats.tx_packets++;
@@ -835,7 +835,7 @@ static netdev_tx_t ems_usb_start_xmit(struct sk_buff *skb, struct net_device *ne
                        stats->tx_dropped++;
                }
        } else {
-               netdev->trans_start = jiffies;
+               netif_trans_update(netdev);
 
                /* Slow down tx path */
                if (atomic_read(&dev->active_tx_urbs) >= MAX_TX_URBS ||
index 113e64fcd73be9a16635f0029ed3c6d0c2a17306..784a9002fbb9309291b443363967101d54e2a97f 100644 (file)
@@ -480,7 +480,7 @@ static void esd_usb2_write_bulk_callback(struct urb *urb)
        if (urb->status)
                netdev_info(netdev, "Tx URB aborted (%d)\n", urb->status);
 
-       netdev->trans_start = jiffies;
+       netif_trans_update(netdev);
 }
 
 static ssize_t show_firmware(struct device *d,
@@ -820,7 +820,7 @@ static netdev_tx_t esd_usb2_start_xmit(struct sk_buff *skb,
                goto releasebuf;
        }
 
-       netdev->trans_start = jiffies;
+       netif_trans_update(netdev);
 
        /*
         * Release our reference to this URB, the USB core will eventually free
index 5a2e341a6d1ea7b2e2586414fa41592b7ad78099..bfb91d8fa46056b9fc9d7d51dfd0dfc0ad251d89 100644 (file)
@@ -274,7 +274,7 @@ static void peak_usb_write_bulk_callback(struct urb *urb)
                netdev->stats.tx_bytes += context->data_len;
 
                /* prevent tx timeout */
-               netdev->trans_start = jiffies;
+               netif_trans_update(netdev);
                break;
 
        default:
@@ -373,7 +373,7 @@ static netdev_tx_t peak_usb_ndo_start_xmit(struct sk_buff *skb,
                        stats->tx_dropped++;
                }
        } else {
-               netdev->trans_start = jiffies;
+               netif_trans_update(netdev);
 
                /* slow down tx path */
                if (atomic_read(&dev->active_tx_urbs) >= PCAN_USB_MAX_TX_URBS)
index 64c016a99af80b0bf20114b98193e4544d598630..221f5f011ff9e6bb64d07d36aef80bbd749f14ed 100644 (file)
@@ -1106,7 +1106,7 @@ e100_send_packet(struct sk_buff *skb, struct net_device *dev)
 
        myNextTxDesc->skb = skb;
 
-       dev->trans_start = jiffies; /* NETIF_F_LLTX driver :( */
+       netif_trans_update(dev); /* NETIF_F_LLTX driver :( */
 
        e100_hardware_send_packet(np, buf, skb->len);
 
index 7677c745fb30b38bf9371e7ada66c87f14bd4184..91ada52f776b67b84be5c02d1daff13fe85b8e0d 100644 (file)
@@ -699,7 +699,7 @@ el3_tx_timeout (struct net_device *dev)
                dev->name, inb(ioaddr + TX_STATUS), inw(ioaddr + EL3_STATUS),
                inw(ioaddr + TX_FREE));
        dev->stats.tx_errors++;
-       dev->trans_start = jiffies; /* prevent tx timeout */
+       netif_trans_update(dev); /* prevent tx timeout */
        /* Issue TX_RESET and TX_START commands. */
        outw(TxReset, ioaddr + EL3_CMD);
        outw(TxEnable, ioaddr + EL3_CMD);
index 942fb0d5aacebf0b7f565836979b7d61ab3b9cfb..b26e038b4a0e904861262cc6c0bcf570d3a2d6d0 100644 (file)
@@ -992,7 +992,7 @@ static void corkscrew_timeout(struct net_device *dev)
                if (!(inw(ioaddr + EL3_STATUS) & CmdInProgress))
                        break;
        outw(TxEnable, ioaddr + EL3_CMD);
-       dev->trans_start = jiffies; /* prevent tx timeout */
+       netif_trans_update(dev); /* prevent tx timeout */
        dev->stats.tx_errors++;
        dev->stats.tx_dropped++;
        netif_wake_queue(dev);
index b9948f00c5e9d4121099190adb653ac2d3f48183..b88afd7593074d83bd878882d3fc31a4306dd654 100644 (file)
@@ -700,7 +700,7 @@ static void el3_tx_timeout(struct net_device *dev)
        netdev_notice(dev, "Transmit timed out!\n");
        dump_status(dev);
        dev->stats.tx_errors++;
-       dev->trans_start = jiffies; /* prevent tx timeout */
+       netif_trans_update(dev); /* prevent tx timeout */
        /* Issue TX_RESET and TX_START commands. */
        tc574_wait_for_completion(dev, TxReset);
        outw(TxEnable, ioaddr + EL3_CMD);
index c5a320507556a83adf4595ef5a6071e81a056848..71396e4b87e399f757d27828adc97c2a00db8660 100644 (file)
@@ -534,7 +534,7 @@ static void el3_tx_timeout(struct net_device *dev)
        netdev_warn(dev, "Transmit timed out!\n");
        dump_status(dev);
        dev->stats.tx_errors++;
-       dev->trans_start = jiffies; /* prevent tx timeout */
+       netif_trans_update(dev); /* prevent tx timeout */
        /* Issue TX_RESET and TX_START commands. */
        tc589_wait_for_completion(dev, TxReset);
        outw(TxEnable, ioaddr + EL3_CMD);
index d81fceddbe0e86d2f6489c3210051fe7265a6560..25c55ab05c7dd2ba604f25be756130c042449c71 100644 (file)
@@ -1944,7 +1944,7 @@ static void vortex_tx_timeout(struct net_device *dev)
        }
        /* Issue Tx Enable */
        iowrite16(TxEnable, ioaddr + EL3_CMD);
-       dev->trans_start = jiffies; /* prevent tx timeout */
+       netif_trans_update(dev); /* prevent tx timeout */
 }
 
 /*
index ec6eac1f8c95ab79d33209e272a31f71484b0f62..4ea717d68c957a38704ec403ccc80712274bc0a9 100644 (file)
@@ -1041,7 +1041,7 @@ static netdev_tx_t axnet_start_xmit(struct sk_buff *skb,
        {
                ei_local->txing = 1;
                NS8390_trigger_send(dev, send_length, output_page);
-               dev->trans_start = jiffies;
+               netif_trans_update(dev);
                if (output_page == ei_local->tx_start_page) 
                {
                        ei_local->tx1 = -1;
@@ -1270,7 +1270,7 @@ static void ei_tx_intr(struct net_device *dev)
                {
                        ei_local->txing = 1;
                        NS8390_trigger_send(dev, ei_local->tx2, ei_local->tx_start_page + 6);
-                       dev->trans_start = jiffies;
+                       netif_trans_update(dev);
                        ei_local->tx2 = -1,
                        ei_local->lasttx = 2;
                }
@@ -1287,7 +1287,7 @@ static void ei_tx_intr(struct net_device *dev)
                {
                        ei_local->txing = 1;
                        NS8390_trigger_send(dev, ei_local->tx1, ei_local->tx_start_page);
-                       dev->trans_start = jiffies;
+                       netif_trans_update(dev);
                        ei_local->tx1 = -1;
                        ei_local->lasttx = 1;
                }
index b96e8852b2d195109b92ff6dd41a2b04a02d5389..60f8e2c8e726664f5b5b58d054473f59e8cd0ffc 100644 (file)
@@ -596,7 +596,7 @@ static void ei_tx_intr(struct net_device *dev)
                if (ei_local->tx2 > 0) {
                        ei_local->txing = 1;
                        NS8390_trigger_send(dev, ei_local->tx2, ei_local->tx_start_page + 6);
-                       dev->trans_start = jiffies;
+                       netif_trans_update(dev);
                        ei_local->tx2 = -1,
                        ei_local->lasttx = 2;
                } else
@@ -609,7 +609,7 @@ static void ei_tx_intr(struct net_device *dev)
                if (ei_local->tx1 > 0) {
                        ei_local->txing = 1;
                        NS8390_trigger_send(dev, ei_local->tx1, ei_local->tx_start_page);
-                       dev->trans_start = jiffies;
+                       netif_trans_update(dev);
                        ei_local->tx1 = -1;
                        ei_local->lasttx = 1;
                } else
index ac7288240d5534cada9015d098cbef3e37139491..1d1069641d81f3a2dbd405a66a3cf5de044fccb4 100644 (file)
@@ -1129,7 +1129,7 @@ static void tx_timeout(struct net_device *dev)
 
        /* Trigger an immediate transmit demand. */
 
-       dev->trans_start = jiffies; /* prevent tx timeout */
+       netif_trans_update(dev); /* prevent tx timeout */
        dev->stats.tx_errors++;
        netif_wake_queue(dev);
 }
index 74139cb7f84920ff2387204b782a08881a3ea6c8..3d2245fdc283edea9660db540f1beec17a63e8bd 100644 (file)
@@ -1430,7 +1430,7 @@ static void bfin_mac_timeout(struct net_device *dev)
        bfin_mac_enable(lp->phydev);
 
        /* We can accept TX packets again */
-       dev->trans_start = jiffies; /* prevent tx timeout */
+       netif_trans_update(dev); /* prevent tx timeout */
 }
 
 static void bfin_mac_multicast_hash(struct net_device *dev)
index 0907ab6ff309e65ac4ff56250443dc23d6904b1c..30defe6c81f22d6463c4df091a421014392f6ff2 100644 (file)
@@ -3349,7 +3349,7 @@ static void et131x_down(struct net_device *netdev)
        struct et131x_adapter *adapter = netdev_priv(netdev);
 
        /* Save the timestamp for the TX watchdog, prevent a timeout */
-       netdev->trans_start = jiffies;
+       netif_trans_update(netdev);
 
        phy_stop(adapter->phydev);
        et131x_disable_txrx(netdev);
@@ -3816,7 +3816,7 @@ static netdev_tx_t et131x_tx(struct sk_buff *skb, struct net_device *netdev)
                netif_stop_queue(netdev);
 
        /* Save the timestamp for the TX timeout watchdog */
-       netdev->trans_start = jiffies;
+       netif_trans_update(netdev);
 
        /* TCB is not available */
        if (tx_ring->used >= NUM_TCB)
index 8d50314ac3eb1f308d1cc556270058aba05c7b60..de2c4bf5fac461839b929bae5033c877130cc05d 100644 (file)
@@ -428,7 +428,7 @@ static void emac_timeout(struct net_device *dev)
        emac_reset(db);
        emac_init_device(dev);
        /* We can accept TX packets again */
-       dev->trans_start = jiffies;
+       netif_trans_update(dev);
        netif_wake_queue(dev);
 
        /* Restore previous register address */
@@ -468,7 +468,7 @@ static int emac_start_xmit(struct sk_buff *skb, struct net_device *dev)
                       db->membase + EMAC_TX_CTL0_REG);
 
                /* save the time stamp */
-               dev->trans_start = jiffies;
+               netif_trans_update(dev);
        } else if (channel == 1) {
                /* set TX len */
                writel(skb->len, db->membase + EMAC_TX_PL1_REG);
@@ -477,7 +477,7 @@ static int emac_start_xmit(struct sk_buff *skb, struct net_device *dev)
                       db->membase + EMAC_TX_CTL1_REG);
 
                /* save the time stamp */
-               dev->trans_start = jiffies;
+               netif_trans_update(dev);
        }
 
        if ((db->tx_fifo_stat & 3) == 3) {
index 8e75755715318968ff21cad7c8635fef69bbc77c..dcf2a1f3643d79aa3bf7971c5dda37c22561a27a 100644 (file)
@@ -260,7 +260,7 @@ static int lance_reset(struct net_device *dev)
 
        load_csrs(lp);
        lance_init_ring(dev);
-       dev->trans_start = jiffies; /* prevent tx timeout */
+       netif_trans_update(dev); /* prevent tx timeout */
        status = init_restart_lance(lp);
 #ifdef DEBUG_DRIVER
        printk("Lance restart=%d\n", status);
@@ -530,7 +530,7 @@ void lance_tx_timeout(struct net_device *dev)
 {
        printk("lance_tx_timeout\n");
        lance_reset(dev);
-       dev->trans_start = jiffies; /* prevent tx timeout */
+       netif_trans_update(dev); /* prevent tx timeout */
        netif_wake_queue(dev);
 }
 EXPORT_SYMBOL_GPL(lance_tx_timeout);
index 2a18d34d2610d660d3062dd733137c8950b18b1f..a83cd1c4ce1d051885050c6d5b7b257fce562c62 100644 (file)
@@ -512,7 +512,7 @@ static inline int lance_reset(struct net_device *dev)
        load_csrs(lp);
 
        lance_init_ring(dev);
-       dev->trans_start = jiffies; /* prevent tx timeout */
+       netif_trans_update(dev); /* prevent tx timeout */
        netif_start_queue(dev);
 
        status = init_restart_lance(lp);
index b10964e8cb5469ce6bc10fa8f9524f06663b78b3..d2bc8e5dcd23b21dab55b377961d358b55a29ede 100644 (file)
@@ -764,7 +764,7 @@ static void lance_tx_timeout (struct net_device *dev)
        /* lance_restart, essentially */
        lance_init_ring(dev);
        REGA( CSR0 ) = CSR0_INEA | CSR0_INIT | CSR0_STRT;
-       dev->trans_start = jiffies; /* prevent tx timeout */
+       netif_trans_update(dev); /* prevent tx timeout */
        netif_wake_queue(dev);
 }
 
index d3977d032b488e8a571f37e633cd012b04e7e7d4..9af309e017fdadfa67cb7200a1c3d3cd76252c83 100644 (file)
@@ -1074,7 +1074,7 @@ static void au1000_tx_timeout(struct net_device *dev)
        netdev_err(dev, "au1000_tx_timeout: dev=%p\n", dev);
        au1000_reset_mac(dev);
        au1000_init(dev);
-       dev->trans_start = jiffies; /* prevent tx timeout */
+       netif_trans_update(dev); /* prevent tx timeout */
        netif_wake_queue(dev);
 }
 
index b584b78237dfdbf9ae50618c2b992459137b2739..b799c7ac899b984bbeeacfc55f0d0917c7e2a037 100644 (file)
@@ -877,7 +877,7 @@ static inline int lance_reset(struct net_device *dev)
 
        lance_init_ring(dev);
        load_csrs(lp);
-       dev->trans_start = jiffies; /* prevent tx timeout */
+       netif_trans_update(dev); /* prevent tx timeout */
        status = init_restart_lance(lp);
        return status;
 }
index 3a7ebfdda57dee33cbde71cf3440e5eb70aa262a..abb1ba228b26512f020d89f5123faaa1a9a7e3a4 100644 (file)
@@ -943,7 +943,7 @@ static void lance_tx_timeout (struct net_device *dev)
 #endif
        lance_restart (dev, 0x0043, 1);
 
-       dev->trans_start = jiffies; /* prevent tx timeout */
+       netif_trans_update(dev); /* prevent tx timeout */
        netif_wake_queue (dev);
 }
 
index 1cf33addd15e23ee7cbe987c9a82f19588ffa178..cda53db75f17bdc957bcf3dcce20eda52dd04daa 100644 (file)
@@ -782,7 +782,7 @@ static void ni65_stop_start(struct net_device *dev,struct priv *p)
                if(!p->lock)
                        if (p->tmdnum || !p->xmit_queued)
                                netif_wake_queue(dev);
-               dev->trans_start = jiffies; /* prevent tx timeout */
+               netif_trans_update(dev); /* prevent tx timeout */
        }
        else
                writedatareg(CSR0_STRT | csr0);
@@ -1148,7 +1148,7 @@ static void ni65_timeout(struct net_device *dev)
                printk("%02x ",p->tmdhead[i].u.s.status);
        printk("\n");
        ni65_lance_reinit(dev);
-       dev->trans_start = jiffies; /* prevent tx timeout */
+       netif_trans_update(dev); /* prevent tx timeout */
        netif_wake_queue(dev);
 }
 
index 27245efe9f50098eee594cb844e5e1647978bf3d..2807e181647bfde7b81b4e6ecd648be2a9c40ef2 100644 (file)
@@ -851,7 +851,7 @@ static void mace_tx_timeout(struct net_device *dev)
 #else /* #if RESET_ON_TIMEOUT */
   pr_cont("NOT resetting card\n");
 #endif /* #if RESET_ON_TIMEOUT */
-  dev->trans_start = jiffies; /* prevent tx timeout */
+  netif_trans_update(dev); /* prevent tx timeout */
   netif_wake_queue(dev);
 }
 
index 7ccebae9cb48794cd3977a6fb49844a5bc57e75a..c22bf52d3320b4831f944ceef01770264acc3c6b 100644 (file)
@@ -448,7 +448,7 @@ static void pcnet32_netif_stop(struct net_device *dev)
 {
        struct pcnet32_private *lp = netdev_priv(dev);
 
-       dev->trans_start = jiffies; /* prevent tx timeout */
+       netif_trans_update(dev); /* prevent tx timeout */
        napi_disable(&lp->napi);
        netif_tx_disable(dev);
 }
@@ -2426,7 +2426,7 @@ static void pcnet32_tx_timeout(struct net_device *dev)
        }
        pcnet32_restart(dev, CSR0_NORMAL);
 
-       dev->trans_start = jiffies; /* prevent tx timeout */
+       netif_trans_update(dev); /* prevent tx timeout */
        netif_wake_queue(dev);
 
        spin_unlock_irqrestore(&lp->lock, flags);
index 7847638bdd224c55fe1bb2c7d4638628ce5687e9..9b56b40259dccbfe14bffff5ce246cc71bed17bd 100644 (file)
@@ -997,7 +997,7 @@ static int lance_reset(struct net_device *dev)
        }
        lp->init_ring(dev);
        load_csrs(lp);
-       dev->trans_start = jiffies; /* prevent tx timeout */
+       netif_trans_update(dev); /* prevent tx timeout */
        status = init_restart_lance(lp);
        return status;
 }
index 55b118e876fdece9343fa3c24296eac14b6fa411..9fe8b5e310d15a024aec48456f43444137637138 100644 (file)
@@ -745,7 +745,7 @@ static netdev_features_t alx_fix_features(struct net_device *netdev,
 
 static void alx_netif_stop(struct alx_priv *alx)
 {
-       alx->dev->trans_start = jiffies;
+       netif_trans_update(alx->dev);
        if (netif_carrier_ok(alx->dev)) {
                netif_carrier_off(alx->dev);
                netif_tx_disable(alx->dev);
index 30b0c2895a563ea4585b9f0f494bc08b323b6c15..543bf38105c9240d9ae374708377755c5e4db9a6 100644 (file)
@@ -1117,7 +1117,7 @@ static void bcm_sysport_tx_timeout(struct net_device *dev)
 {
        netdev_warn(dev, "transmit timeout!\n");
 
-       dev->trans_start = jiffies;
+       netif_trans_update(dev);
        dev->stats.tx_errors++;
 
        netif_tx_wake_all_queues(dev);
index fbff226369ac345d3839feffefe81786dff0ecbf..541456398dfb1efac4ba455aaa31c8fc723c098a 100644 (file)
@@ -3059,7 +3059,7 @@ static void bcmgenet_timeout(struct net_device *dev)
        bcmgenet_intrl2_0_writel(priv, int0_enable, INTRL2_CPU_MASK_CLEAR);
        bcmgenet_intrl2_1_writel(priv, int1_enable, INTRL2_CPU_MASK_CLEAR);
 
-       dev->trans_start = jiffies;
+       netif_trans_update(dev);
 
        dev->stats.tx_errors++;
 
index eacc559679bf84801c6e4f6211bcb7ae2c4ac1c5..f1b81187a20101eca9d491a61c08bf1e4e7af30c 100644 (file)
@@ -2462,7 +2462,7 @@ static void sbmac_tx_timeout (struct net_device *dev)
        spin_lock_irqsave(&sc->sbm_lock, flags);
 
 
-       dev->trans_start = jiffies; /* prevent tx timeout */
+       netif_trans_update(dev); /* prevent tx timeout */
        dev->stats.tx_errors++;
 
        spin_unlock_irqrestore(&sc->sbm_lock, flags);
index 3010080cfeee350a2e523ce0c26aeb427953f21a..ff300f7cf5295fc0d4f1e1b0692d74e6a6091912 100644 (file)
@@ -7383,7 +7383,7 @@ static void tg3_napi_fini(struct tg3 *tp)
 
 static inline void tg3_netif_stop(struct tg3 *tp)
 {
-       tp->dev->trans_start = jiffies; /* prevent tx timeout */
+       netif_trans_update(tp->dev);    /* prevent tx timeout */
        tg3_napi_disable(tp);
        netif_carrier_off(tp->dev);
        netif_tx_disable(tp->dev);
index 34d269cd5579b7e0f1c1afd29bffb04c8711d71d..8de79ae63231b0ad21e47edb9a150e026adf6bd3 100644 (file)
@@ -2899,7 +2899,7 @@ static int liquidio_xmit(struct sk_buff *skb, struct net_device *netdev)
        if (status == IQ_SEND_STOP)
                stop_q(lio->netdev, q_idx);
 
-       netdev->trans_start = jiffies;
+       netif_trans_update(netdev);
 
        stats->tx_done++;
        stats->tx_tot_bytes += skb->len;
@@ -2928,7 +2928,7 @@ static void liquidio_tx_timeout(struct net_device *netdev)
        netif_info(lio, tx_err, lio->netdev,
                   "Transmit timeout tx_dropped:%ld, waking up queues now!!\n",
                   netdev->stats.tx_dropped);
-       netdev->trans_start = jiffies;
+       netif_trans_update(netdev);
        txqs_wake(netdev);
 }
 
index c177c7cec13b462b80a2001a9d8a272b606710b1..388cd799d9edc203c88a60066ef98ed3d4958ef9 100644 (file)
@@ -1320,7 +1320,7 @@ static int octeon_mgmt_xmit(struct sk_buff *skb, struct net_device *netdev)
        /* Ring the bell.  */
        cvmx_write_csr(p->mix + MIX_ORING2, 1);
 
-       netdev->trans_start = jiffies;
+       netif_trans_update(netdev);
        rv = NETDEV_TX_OK;
 out:
        octeon_mgmt_update_tx_stats(netdev);
index bfee298fc02abc96e16cae7854d9de3036172542..a19e73f11d73c84a829d95980688249c511b21c4 100644 (file)
@@ -1442,7 +1442,7 @@ static void nicvf_reset_task(struct work_struct *work)
 
        nicvf_stop(nic->netdev);
        nicvf_open(nic->netdev);
-       nic->netdev->trans_start = jiffies;
+       netif_trans_update(nic->netdev);
 }
 
 static int nicvf_config_loopback(struct nicvf *nic,
index 1ccd282949a5496ea15122857ba2bc293ed99668..1bb57d3fbbe8783e32187509081ea3a63991641e 100644 (file)
@@ -1448,7 +1448,7 @@ int t4vf_eth_xmit(struct sk_buff *skb, struct net_device *dev)
         * the new TX descriptors and return success.
         */
        txq_advance(&txq->q, ndesc);
-       dev->trans_start = jiffies;
+       netif_trans_update(dev);
        ring_tx_db(adapter, &txq->q, ndesc);
        return NETDEV_TX_OK;
 
index 48d91941408d8fe3aa148c632ff33c1ea4201335..9e061307975f3f61c1689df3c2a1b5c612e94fe9 100644 (file)
@@ -966,7 +966,7 @@ dm9000_init_dm9000(struct net_device *dev)
        /* Init Driver variable */
        db->tx_pkt_cnt = 0;
        db->queue_pkt_len = 0;
-       dev->trans_start = jiffies;
+       netif_trans_update(dev);
 }
 
 /* Our watchdog timed out. Called by the networking layer */
@@ -985,7 +985,7 @@ static void dm9000_timeout(struct net_device *dev)
        dm9000_init_dm9000(dev);
        dm9000_unmask_interrupts(db);
        /* We can accept TX packets again */
-       dev->trans_start = jiffies; /* prevent tx timeout */
+       netif_trans_update(dev); /* prevent tx timeout */
        netif_wake_queue(dev);
 
        /* Restore previous register address */
index d88fbab378aaa5a71310c8de8db82cb2a6a9e6f8..cbe84972ff7a644fb31f84b30a6cf09e12cae737 100644 (file)
@@ -1336,7 +1336,7 @@ de4x5_open(struct net_device *dev)
     }
 
     lp->interrupt = UNMASK_INTERRUPTS;
-    dev->trans_start = jiffies; /* prevent tx timeout */
+    netif_trans_update(dev); /* prevent tx timeout */
 
     START_DE4X5;
 
@@ -1935,7 +1935,7 @@ set_multicast_list(struct net_device *dev)
 
            lp->tx_new = (lp->tx_new + 1) % lp->txRingSize;
            outl(POLL_DEMAND, DE4X5_TPD);       /* Start the TX */
-           dev->trans_start = jiffies; /* prevent tx timeout */
+           netif_trans_update(dev); /* prevent tx timeout */
        }
     }
 }
index 42c759ef8ff0156c8d441e4f31aac7aea2ef64b1..8ed0fd8b1dda8301a57e4eb9607eeb9d7ccf9102 100644 (file)
@@ -725,7 +725,7 @@ static netdev_tx_t dmfe_start_xmit(struct sk_buff *skb,
                txptr->tdes0 = cpu_to_le32(0x80000000); /* Set owner bit */
                db->tx_packet_cnt++;                    /* Ready to send */
                dw32(DCR1, 0x1);                        /* Issue Tx polling */
-               dev->trans_start = jiffies;             /* saved time stamp */
+               netif_trans_update(dev);                /* saved time stamp */
        } else {
                db->tx_queue_cnt++;                     /* queue TX packet */
                dw32(DCR1, 0x1);                        /* Issue Tx polling */
@@ -931,7 +931,7 @@ static void dmfe_free_tx_pkt(struct net_device *dev, struct dmfe_board_info *db)
                db->tx_packet_cnt++;                    /* Ready to send */
                db->tx_queue_cnt--;
                dw32(DCR1, 0x1);                        /* Issue Tx polling */
-               dev->trans_start = jiffies;             /* saved time stamp */
+               netif_trans_update(dev);                /* saved time stamp */
        }
 
        /* Resource available check */
@@ -1542,7 +1542,7 @@ static void send_filter_frame(struct net_device *dev)
                update_cr6(db->cr6_data | 0x2000, ioaddr);
                dw32(DCR1, 0x1);        /* Issue Tx polling */
                update_cr6(db->cr6_data, ioaddr);
-               dev->trans_start = jiffies;
+               netif_trans_update(dev);
        } else
                db->tx_queue_cnt++;     /* Put in TX queue */
 }
index 5364563c4378a921ca41dc3c53c3cab07e339dd4..7bcccf5cac7acbfc37e8b7e82c10c3d06ed38213 100644 (file)
@@ -44,7 +44,7 @@ void pnic_do_nway(struct net_device *dev)
                        tp->csr6 = new_csr6;
                        /* Restart Tx */
                        tulip_restart_rxtx(tp);
-                       dev->trans_start = jiffies;
+                       netif_trans_update(dev);
                }
        }
 }
@@ -70,7 +70,7 @@ void pnic_lnk_change(struct net_device *dev, int csr5)
                        iowrite32(tp->csr6, ioaddr + CSR6);
                        iowrite32(0x30, ioaddr + CSR12);
                        iowrite32(0x0201F078, ioaddr + 0xB8); /* Turn on autonegotiation. */
-                       dev->trans_start = jiffies;
+                       netif_trans_update(dev);
                }
        } else if (ioread32(ioaddr + CSR5) & TPLnkPass) {
                if (tulip_media_cap[dev->if_port] & MediaIsMII) {
@@ -147,7 +147,7 @@ void pnic_timer(unsigned long data)
                                tp->csr6 = new_csr6;
                                /* Restart Tx */
                                tulip_restart_rxtx(tp);
-                               dev->trans_start = jiffies;
+                               netif_trans_update(dev);
                                if (tulip_debug > 1)
                                        dev_info(&dev->dev,
                                                 "Changing PNIC configuration to %s %s-duplex, CSR6 %08x\n",
index 94d0eebef129fa2b5c27622d223e34c3d999c96f..bbde90bc74fe244f60f925099a77ea50d94084e5 100644 (file)
@@ -605,7 +605,7 @@ static void tulip_tx_timeout(struct net_device *dev)
 
 out_unlock:
        spin_unlock_irqrestore (&tp->lock, flags);
-       dev->trans_start = jiffies; /* prevent tx timeout */
+       netif_trans_update(dev); /* prevent tx timeout */
        netif_wake_queue (dev);
 }
 
index 447d09272ab7ab6d3485073ffcee608dbbf622eb..e750b5ddc0fbb34436f9df49e9cd62ebc5eb0700 100644 (file)
@@ -636,7 +636,7 @@ static netdev_tx_t uli526x_start_xmit(struct sk_buff *skb,
                txptr->tdes0 = cpu_to_le32(0x80000000); /* Set owner bit */
                db->tx_packet_cnt++;                    /* Ready to send */
                uw32(DCR1, 0x1);                        /* Issue Tx polling */
-               dev->trans_start = jiffies;             /* saved time stamp */
+               netif_trans_update(dev);                /* saved time stamp */
        }
 
        /* Tx resource check */
@@ -1431,7 +1431,7 @@ static void send_filter_frame(struct net_device *dev, int mc_cnt)
                update_cr6(db->cr6_data | 0x2000, ioaddr);
                uw32(DCR1, 0x1);        /* Issue Tx polling */
                update_cr6(db->cr6_data, ioaddr);
-               dev->trans_start = jiffies;
+               netif_trans_update(dev);
        } else
                netdev_err(dev, "No Tx resource - Send_filter_frame!\n");
 }
index 3c0e4d5c5fef41a8fe1fe99c0a163d30cd74fc31..1f62b942385101bc475b7d6219b572aebc267cfb 100644 (file)
@@ -966,7 +966,7 @@ static void tx_timeout(struct net_device *dev)
        enable_irq(irq);
 
        netif_wake_queue(dev);
-       dev->trans_start = jiffies; /* prevent tx timeout */
+       netif_trans_update(dev); /* prevent tx timeout */
        np->stats.tx_errors++;
 }
 
index f92b6d9483982bbed33fa8f1dfee73ac67a915e6..78f144696d6b335f90e642709864f1683388d44a 100644 (file)
@@ -706,7 +706,7 @@ rio_tx_timeout (struct net_device *dev)
                dev->name, dr32(TxStatus));
        rio_free_tx(dev, 0);
        dev->if_port = 0;
-       dev->trans_start = jiffies; /* prevent tx timeout */
+       netif_trans_update(dev); /* prevent tx timeout */
 }
 
 static netdev_tx_t
index a28a2e583f0fe48ffa3eb1194dc93a16984f1d0b..58c6338a839e194319146ebe69e282db69db5465 100644 (file)
@@ -1011,7 +1011,7 @@ static void tx_timeout(struct net_device *dev)
 
        dev->if_port = 0;
 
-       dev->trans_start = jiffies; /* prevent tx timeout */
+       netif_trans_update(dev); /* prevent tx timeout */
        dev->stats.tx_errors++;
        if (np->cur_tx - np->dirty_tx < TX_QUEUE_LEN - 4) {
                netif_wake_queue(dev);
index b1b9ebafb354d28676f85b5b9522655e0daeaff1..c08bd763172a76da6ae68a00d55e06992d6cacdd 100644 (file)
@@ -1227,7 +1227,7 @@ static void fealnx_tx_timeout(struct net_device *dev)
 
        spin_unlock_irqrestore(&np->lock, flags);
 
-       dev->trans_start = jiffies; /* prevent tx timeout */
+       netif_trans_update(dev); /* prevent tx timeout */
        dev->stats.tx_errors++;
        netif_wake_queue(dev); /* or .._start_.. ?? */
 }
index d2f917af539f35b8f994507c5c3758944b1d9d0d..a5800413f9178f8d0e9f9fd3969f0f23fcd72cae 100644 (file)
@@ -2076,7 +2076,7 @@ void gfar_start(struct gfar_private *priv)
 
        gfar_ints_enable(priv);
 
-       priv->ndev->trans_start = jiffies; /* prevent tx timeout */
+       netif_trans_update(priv->ndev); /* prevent tx timeout */
 }
 
 static void free_grp_irqs(struct gfar_priv_grp *grp)
index 678f5018d0be1c410c809fd8031a9f6e6601210e..399cfd217288d9e32b0fd9ba188e974a4663a87e 100644 (file)
@@ -746,7 +746,7 @@ static irqreturn_t fjn_interrupt(int dummy, void *dev_id)
            lp->sent = lp->tx_queue ;
            lp->tx_queue = 0;
            lp->tx_queue_len = 0;
-           dev->trans_start = jiffies;
+           netif_trans_update(dev);
        } else {
            lp->tx_started = 0;
        }
index e51892d518ff3ccca8aaed43838d7343b4844dc3..b9f2ea59308a6869eeca58cc1e2b6d9b7d56ea49 100644 (file)
@@ -636,7 +636,7 @@ static int hix5hd2_net_xmit(struct sk_buff *skb, struct net_device *dev)
        pos = dma_ring_incr(pos, TX_DESC_NUM);
        writel_relaxed(dma_byte(pos), priv->base + TX_BQ_WR_ADDR);
 
-       dev->trans_start = jiffies;
+       netif_trans_update(dev);
        dev->stats.tx_packets++;
        dev->stats.tx_bytes += skb->len;
        netdev_sent_queue(dev, skb->len);
index e47aff250b15ca6b5fa4ffce6197c0994133e48b..e621636e69b9e6b1f45a682e67027f1fb0003d21 100644 (file)
@@ -1275,7 +1275,7 @@ void hns_nic_net_reinit(struct net_device *netdev)
 {
        struct hns_nic_priv *priv = netdev_priv(netdev);
 
-       priv->netdev->trans_start = jiffies;
+       netif_trans_update(priv->netdev);
        while (test_and_set_bit(NIC_STATE_REINITING, &priv->state))
                usleep_range(1000, 2000);
 
@@ -1376,7 +1376,7 @@ static netdev_tx_t hns_nic_net_xmit(struct sk_buff *skb,
        ret = hns_nic_net_xmit_hw(ndev, skb,
                                  &tx_ring_data(priv, skb->queue_mapping));
        if (ret == NETDEV_TX_OK) {
-               ndev->trans_start = jiffies;
+               netif_trans_update(ndev);
                ndev->stats.tx_bytes += skb->len;
                ndev->stats.tx_packets++;
        }
@@ -1648,7 +1648,7 @@ static void hns_nic_reset_subtask(struct hns_nic_priv *priv)
 
        rtnl_lock();
        /* put off any impending NetWatchDogTimeout */
-       priv->netdev->trans_start = jiffies;
+       netif_trans_update(priv->netdev);
 
        if (type == HNAE_PORT_DEBUG) {
                hns_nic_net_reinit(priv->netdev);
index 3daf2d4a7ca057a66e9ad797baa581c0d92caeba..631dbc7b4dbb9b95985a8b4a2431cc648ef74644 100644 (file)
@@ -1102,7 +1102,7 @@ static int hp100_open(struct net_device *dev)
                return -EAGAIN;
        }
 
-       dev->trans_start = jiffies; /* prevent tx timeout */
+       netif_trans_update(dev); /* prevent tx timeout */
        netif_start_queue(dev);
 
        lp->lan_type = hp100_sense_lan(dev);
index 7ce6379fd1a362cfbad846f7881cdae0d03e6982..befb4ac3e2b0eaa09eaf2909cbcdcf57fd39c3a4 100644 (file)
@@ -1042,7 +1042,7 @@ static void i596_tx_timeout (struct net_device *dev)
                lp->last_restart = dev->stats.tx_packets;
        }
 
-       dev->trans_start = jiffies; /* prevent tx timeout */
+       netif_trans_update(dev); /* prevent tx timeout */
        netif_wake_queue (dev);
 }
 
index c984998b34a02dfe4095be9479a71eb0326a1fbb..3dbc53c21baa4b02a6f4e16fbaab50d9ea09ba17 100644 (file)
@@ -960,7 +960,7 @@ static void i596_tx_timeout (struct net_device *dev)
                lp->last_restart = dev->stats.tx_packets;
        }
 
-       dev->trans_start = jiffies; /* prevent tx timeout */
+       netif_trans_update(dev); /* prevent tx timeout */
        netif_wake_queue (dev);
 }
 
index 353f57f675d0211b378bc15c7924446fd52d974c..21c84cc9c871d5fd66d05b104426cf7252a1000a 100644 (file)
@@ -983,7 +983,7 @@ static void sun3_82586_timeout(struct net_device *dev)
                p->scb->cmd_cuc = CUC_START;
                sun3_attn586();
                WAIT_4_SCB_CMD();
-               dev->trans_start = jiffies; /* prevent tx timeout */
+               netif_trans_update(dev); /* prevent tx timeout */
                return 0;
        }
 #endif
@@ -996,7 +996,7 @@ static void sun3_82586_timeout(struct net_device *dev)
                sun3_82586_close(dev);
                sun3_82586_open(dev);
        }
-       dev->trans_start = jiffies; /* prevent tx timeout */
+       netif_trans_update(dev); /* prevent tx timeout */
 }
 
 /******************************************************
index 5d7db6c01c46c04adcf0b12b49e67610c0d67ca7..4c9771d57d6e7fce3a77e093e467fe2d0342243e 100644 (file)
@@ -301,7 +301,7 @@ static inline void emac_netif_stop(struct emac_instance *dev)
        dev->no_mcast = 1;
        netif_addr_unlock(dev->ndev);
        netif_tx_unlock_bh(dev->ndev);
-       dev->ndev->trans_start = jiffies;       /* prevent tx timeout */
+       netif_trans_update(dev->ndev);  /* prevent tx timeout */
        mal_poll_disable(dev->mal, &dev->commac);
        netif_tx_disable(dev->ndev);
 }
@@ -1377,7 +1377,7 @@ static inline int emac_xmit_finish(struct emac_instance *dev, int len)
                DBG2(dev, "stopped TX queue" NL);
        }
 
-       ndev->trans_start = jiffies;
+       netif_trans_update(ndev);
        ++dev->stats.tx_packets;
        dev->stats.tx_bytes += len;
 
index 206a466999ed9a0e3f08c60ec2c0ef4af56cf521..e05aca9bef0e635bd33e5a882e022ade06732aa0 100644 (file)
@@ -145,7 +145,7 @@ static void fm10k_reinit(struct fm10k_intfc *interface)
        WARN_ON(in_interrupt());
 
        /* put off any impending NetWatchDogTimeout */
-       netdev->trans_start = jiffies;
+       netif_trans_update(netdev);
 
        while (test_and_set_bit(__FM10K_RESETTING, &interface->state))
                usleep_range(1000, 2000);
index 18dcfc577ba9c485b69e7df3de4f6a79b607c3b5..5f3d239310c648b21bfd023bd7ddeb38558457a8 100644 (file)
@@ -5287,7 +5287,7 @@ void ixgbe_reinit_locked(struct ixgbe_adapter *adapter)
 {
        WARN_ON(in_interrupt());
        /* put off any impending NetWatchDogTimeout */
-       adapter->netdev->trans_start = jiffies;
+       netif_trans_update(adapter->netdev);
 
        while (test_and_set_bit(__IXGBE_RESETTING, &adapter->state))
                usleep_range(1000, 2000);
index d74f5f4e57824a97a3b745d4cbaa77098ad69ba3..1799fe1415df5070104edf4946a537e245c80176 100644 (file)
@@ -152,7 +152,7 @@ static inline void korina_abort_dma(struct net_device *dev,
               writel(0x10, &ch->dmac);
 
               while (!(readl(&ch->dmas) & DMA_STAT_HALT))
-                      dev->trans_start = jiffies;
+                      netif_trans_update(dev);
 
               writel(0, &ch->dmas);
        }
@@ -283,7 +283,7 @@ static int korina_send_packet(struct sk_buff *skb, struct net_device *dev)
        }
        dma_cache_wback((u32) td, sizeof(*td));
 
-       dev->trans_start = jiffies;
+       netif_trans_update(dev);
        spin_unlock_irqrestore(&lp->lock, flags);
 
        return NETDEV_TX_OK;
@@ -622,7 +622,7 @@ korina_tx_dma_interrupt(int irq, void *dev_id)
                                &(lp->tx_dma_regs->dmandptr));
                        lp->tx_chain_status = desc_empty;
                        lp->tx_chain_head = lp->tx_chain_tail;
-                       dev->trans_start = jiffies;
+                       netif_trans_update(dev);
                }
                if (dmas & DMA_STAT_ERR)
                        printk(KERN_ERR "%s: DMA error\n", dev->name);
@@ -811,7 +811,7 @@ static int korina_init(struct net_device *dev)
        /* reset ethernet logic */
        writel(0, &lp->eth_regs->ethintfc);
        while ((readl(&lp->eth_regs->ethintfc) & ETH_INT_FC_RIP))
-               dev->trans_start = jiffies;
+               netif_trans_update(dev);
 
        /* Enable Ethernet Interface */
        writel(ETH_INT_FC_EN, &lp->eth_regs->ethintfc);
index b630ef1e96469e1a6021ccf65845f420697d29ea..dc82b1b19574c369229ed6da33419e3c4dfce466 100644 (file)
@@ -519,7 +519,7 @@ ltq_etop_tx(struct sk_buff *skb, struct net_device *dev)
        byte_offset = CPHYSADDR(skb->data) % 16;
        ch->skb[ch->dma.desc] = skb;
 
-       dev->trans_start = jiffies;
+       netif_trans_update(dev);
 
        spin_lock_irqsave(&priv->lock, flags);
        desc->addr = ((unsigned int) dma_map_single(NULL, skb->data, len,
@@ -657,7 +657,7 @@ ltq_etop_tx_timeout(struct net_device *dev)
        err = ltq_etop_hw_init(dev);
        if (err)
                goto err_hw;
-       dev->trans_start = jiffies;
+       netif_trans_update(dev);
        netif_wake_queue(dev);
        return;
 
index c442f6ad15fff806af5f747e70d085766dd37ae9..15cf50d7e3168238aa2745bc46697ca9efc91cca 100644 (file)
@@ -1297,7 +1297,7 @@ static int pxa168_eth_start_xmit(struct sk_buff *skb, struct net_device *dev)
 
        stats->tx_bytes += length;
        stats->tx_packets++;
-       dev->trans_start = jiffies;
+       netif_trans_update(dev);
        if (pep->tx_ring_size - pep->tx_desc_count <= 1) {
                /* We handled the current skb, but now we are out of space.*/
                netif_stop_queue(dev);
index ec0a22119e09e2a49b54c9a23995e200a2d780a9..467138b423d3629cf468b3c54606a321214909ba 100644 (file)
@@ -2418,7 +2418,7 @@ static int sky2_change_mtu(struct net_device *dev, int new_mtu)
        sky2_write32(hw, B0_IMSK, 0);
        sky2_read32(hw, B0_IMSK);
 
-       dev->trans_start = jiffies;     /* prevent tx timeout */
+       netif_trans_update(dev);        /* prevent tx timeout */
        napi_disable(&hw->napi);
        netif_tx_disable(dev);
 
index 75dc46c5fca29229b5734110526137fc2c9786cb..280e761d3a975acb042568a69b6603c1616fe36c 100644 (file)
@@ -4790,7 +4790,7 @@ static void transmit_cleanup(struct dev_info *hw_priv, int normal)
 
        /* Notify the network subsystem that the packet has been sent. */
        if (dev)
-               dev->trans_start = jiffies;
+               netif_trans_update(dev);
 }
 
 /**
@@ -4965,7 +4965,7 @@ static void netdev_tx_timeout(struct net_device *dev)
                hw_ena_intr(hw);
        }
 
-       dev->trans_start = jiffies;
+       netif_trans_update(dev);
        netif_wake_queue(dev);
 }
 
index 707283bb62ba7bf4884326bd3e60a32c677318cb..42e34076d2de650399a134fb21e64c119470ee64 100644 (file)
@@ -874,7 +874,7 @@ static netdev_tx_t encx24j600_tx(struct sk_buff *skb, struct net_device *dev)
        netif_stop_queue(dev);
 
        /* save the timestamp */
-       dev->trans_start = jiffies;
+       netif_trans_update(dev);
 
        /* Remember the skb for deferred processing */
        priv->tx_skb = skb;
index 3e67f451f2ab918c95d7a6c3429d45b359e18978..4367dd6879a22791a1bef1726ba8d770b03cebca 100644 (file)
@@ -376,7 +376,7 @@ static int moxart_mac_start_xmit(struct sk_buff *skb, struct net_device *ndev)
 
        priv->tx_head = TX_NEXT(tx_head);
 
-       ndev->trans_start = jiffies;
+       netif_trans_update(ndev);
        ret = NETDEV_TX_OK;
 out_unlock:
        spin_unlock_irq(&priv->txlock);
index 122c2ee3dfe2aaa5948efd35158bf2fdf32bc0d5..ed89029ff75bef44bd224d725ad8b76afc20d467 100644 (file)
@@ -1904,7 +1904,7 @@ static void ns_tx_timeout(struct net_device *dev)
        spin_unlock_irq(&np->lock);
        enable_irq(irq);
 
-       dev->trans_start = jiffies; /* prevent tx timeout */
+       netif_trans_update(dev); /* prevent tx timeout */
        dev->stats.tx_errors++;
        netif_wake_queue(dev);
 }
index 1bd419dbda6dc34d39f1a4fe38ec30a9ca85cf16..612c7a44b26c6c58a16dbdd82017bfb3246bbb69 100644 (file)
@@ -174,7 +174,7 @@ static void sonic_tx_timeout(struct net_device *dev)
        /* Try to restart the adaptor. */
        sonic_init(dev);
        lp->stats.tx_errors++;
-       dev->trans_start = jiffies; /* prevent tx timeout */
+       netif_trans_update(dev); /* prevent tx timeout */
        netif_wake_queue(dev);
 }
 
index 52d9a94aebb9af0aacfe021454df32dfbfa14675..87b7b814778b085e9a38eaa15a4b0ade23b4ddb0 100644 (file)
@@ -476,7 +476,7 @@ static void w90p910_reset_mac(struct net_device *dev)
 
        w90p910_init_desc(dev);
 
-       dev->trans_start = jiffies; /* prevent tx timeout */
+       netif_trans_update(dev); /* prevent tx timeout */
        ether->cur_tx = 0x0;
        ether->finish_tx = 0x0;
        ether->cur_rx = 0x0;
@@ -490,7 +490,7 @@ static void w90p910_reset_mac(struct net_device *dev)
        w90p910_trigger_tx(dev);
        w90p910_trigger_rx(dev);
 
-       dev->trans_start = jiffies; /* prevent tx timeout */
+       netif_trans_update(dev); /* prevent tx timeout */
 
        if (netif_queue_stopped(dev))
                netif_wake_queue(dev);
index 13d88a6025c82a89fb290bc6930cd4055bd1535b..91be2f02ef1cf9d5654a5e7a124506908637a951 100644 (file)
@@ -1144,7 +1144,7 @@ static void hamachi_tx_timeout(struct net_device *dev)
        hmp->rx_ring[RX_RING_SIZE-1].status_n_length |= cpu_to_le32(DescEndRing);
 
        /* Trigger an immediate transmit demand. */
-       dev->trans_start = jiffies; /* prevent tx timeout */
+       netif_trans_update(dev); /* prevent tx timeout */
        dev->stats.tx_errors++;
 
        /* Restart the chip's Tx/Rx processes . */
index fa2db41e02f85d472d89b30ddd22be53bee85280..fb1d1031b0916044ea48ed1d287465827fb0d578 100644 (file)
@@ -714,7 +714,7 @@ static void yellowfin_tx_timeout(struct net_device *dev)
        if (yp->cur_tx - yp->dirty_tx < TX_QUEUE_SIZE)
                netif_wake_queue (dev);         /* Typical path */
 
-       dev->trans_start = jiffies; /* prevent tx timeout */
+       netif_trans_update(dev); /* prevent tx timeout */
        dev->stats.tx_errors++;
 }
 
index fd362b6923f48b9fff5c55fdcf7fd241d94ef9aa..cad37af1517db9f0635a99d99f13fdc261dc3837 100644 (file)
@@ -2285,7 +2285,7 @@ static void netxen_tx_timeout_task(struct work_struct *work)
                        goto request_reset;
                }
        }
-       adapter->netdev->trans_start = jiffies;
+       netif_trans_update(adapter->netdev);
        rtnl_unlock();
        return;
 
index 82f3c8811400490ecde535c686a801c90c213fc3..6e2add97947128804668a9cdb08bac22f1b888d2 100644 (file)
@@ -719,7 +719,7 @@ qcaspi_netdev_xmit(struct sk_buff *skb, struct net_device *dev)
                qca->stats.ring_full++;
        }
 
-       dev->trans_start = jiffies;
+       netif_trans_update(dev);
 
        if (qca->spi_thread &&
            qca->spi_thread->state != TASK_RUNNING)
index d77d60ea820255cd41bc6d37606dfdcd7c4f0395..5cb96785fb632703de8e9c08fe7fca0f37949cbd 100644 (file)
@@ -544,7 +544,7 @@ static void tx_timeout(struct net_device *dev)
        dev->stats.tx_errors++;
        /* Try to restart the adapter. */
        hardware_init(dev);
-       dev->trans_start = jiffies; /* prevent tx timeout */
+       netif_trans_update(dev); /* prevent tx timeout */
        netif_wake_queue(dev);
        dev->stats.tx_errors++;
 }
index ca73366057486a4bc753e7fb00740cec5e748221..c2bd5378ffdaf005d039785bccfe59f52b2d6c8d 100644 (file)
@@ -572,7 +572,7 @@ static inline int sgiseeq_reset(struct net_device *dev)
        if (err)
                return err;
 
-       dev->trans_start = jiffies; /* prevent tx timeout */
+       netif_trans_update(dev); /* prevent tx timeout */
        netif_wake_queue(dev);
 
        return 0;
@@ -648,7 +648,7 @@ static void timeout(struct net_device *dev)
        printk(KERN_NOTICE "%s: transmit timed out, resetting\n", dev->name);
        sgiseeq_reset(dev);
 
-       dev->trans_start = jiffies; /* prevent tx timeout */
+       netif_trans_update(dev); /* prevent tx timeout */
        netif_wake_queue(dev);
 }
 
index 5eac523b4b0ca6c557e9acd59d3b12207fa802ca..aaa80f13859b160f81b19e776a0cac422e302008 100644 (file)
@@ -708,7 +708,7 @@ static int meth_tx(struct sk_buff *skb, struct net_device *dev)
        mace->eth.dma_ctrl = priv->dma_ctrl;
 
        meth_add_to_tx_ring(priv, skb);
-       dev->trans_start = jiffies; /* save the timestamp */
+       netif_trans_update(dev); /* save the timestamp */
 
        /* If TX ring is full, tell the upper layer to stop sending packets */
        if (meth_tx_full(dev)) {
@@ -756,7 +756,7 @@ static void meth_tx_timeout(struct net_device *dev)
        /* Enable interrupt */
        spin_unlock_irqrestore(&priv->meth_lock, flags);
 
-       dev->trans_start = jiffies; /* prevent tx timeout */
+       netif_trans_update(dev); /* prevent tx timeout */
        netif_wake_queue(dev);
 }
 
index fd812d2e5e1c863bbb95a159617ad6beadbbeaec..95001ee408ab1c7229c3bb4067e68927d41f7bb3 100644 (file)
@@ -1575,7 +1575,7 @@ static void sis900_tx_timeout(struct net_device *net_dev)
 
        spin_unlock_irqrestore(&sis_priv->lock, flags);
 
-       net_dev->trans_start = jiffies; /* prevent tx timeout */
+       netif_trans_update(net_dev); /* prevent tx timeout */
 
        /* load Transmit Descriptor Register */
        sw32(txdp, sis_priv->tx_ring_dma);
index 443f1da9fc9e26948a7f48ac7e504a9bfa29086b..7186b89269ad718a2723a9b2f6f79d77e1061aef 100644 (file)
@@ -889,7 +889,7 @@ static void epic_tx_timeout(struct net_device *dev)
                ew32(COMMAND, TxQueued);
        }
 
-       dev->trans_start = jiffies; /* prevent tx timeout */
+       netif_trans_update(dev); /* prevent tx timeout */
        dev->stats.tx_errors++;
        if (!ep->tx_full)
                netif_wake_queue(dev);
index a733868a43aa893aa6246bbef5ff6d76a52b091e..cb49c9654f0a7c2d8d0bb922bc4b38c7e6180419 100644 (file)
@@ -499,7 +499,7 @@ static void smc911x_hardware_send_pkt(struct net_device *dev)
        /* DMA complete IRQ will free buffer and set jiffies */
 #else
        SMC_PUSH_DATA(lp, buf, len);
-       dev->trans_start = jiffies;
+       netif_trans_update(dev);
        dev_kfree_skb_irq(skb);
 #endif
        if (!lp->tx_throttle) {
@@ -1189,7 +1189,7 @@ smc911x_tx_dma_irq(void *data)
        DBG(SMC_DEBUG_TX | SMC_DEBUG_DMA, dev, "TX DMA irq handler\n");
        BUG_ON(skb == NULL);
        dma_unmap_single(NULL, tx_dmabuf, tx_dmalen, DMA_TO_DEVICE);
-       dev->trans_start = jiffies;
+       netif_trans_update(dev);
        dev_kfree_skb_irq(skb);
        lp->current_tx_skb = NULL;
        if (lp->pending_tx_skb != NULL)
@@ -1283,7 +1283,7 @@ static void smc911x_timeout(struct net_device *dev)
                schedule_work(&lp->phy_configure);
 
        /* We can accept TX packets again */
-       dev->trans_start = jiffies; /* prevent tx timeout */
+       netif_trans_update(dev); /* prevent tx timeout */
        netif_wake_queue(dev);
 }
 
index 664f596971b5f6351654bae97c107e6f0b6ce249..d496888b85d34b89331c37c9768d07e6eff7ea64 100644 (file)
@@ -663,7 +663,7 @@ static void smc_hardware_send_packet( struct net_device * dev )
        lp->saved_skb = NULL;
        dev_kfree_skb_any (skb);
 
-       dev->trans_start = jiffies;
+       netif_trans_update(dev);
 
        /* we can send another packet */
        netif_wake_queue(dev);
@@ -1104,7 +1104,7 @@ static void smc_timeout(struct net_device *dev)
        /* "kick" the adaptor */
        smc_reset( dev->base_addr );
        smc_enable( dev->base_addr );
-       dev->trans_start = jiffies; /* prevent tx timeout */
+       netif_trans_update(dev); /* prevent tx timeout */
        /* clear anything saved */
        ((struct smc_local *)netdev_priv(dev))->saved_skb = NULL;
        netif_wake_queue(dev);
index 3449893aea8d402fb2fc56582df92a04aa157c10..db3c696d7002ad921bbf8d4d3257f7e738c36c07 100644 (file)
@@ -1172,7 +1172,7 @@ static void smc_hardware_send_packet(struct net_device * dev)
 
     smc->saved_skb = NULL;
     dev_kfree_skb_irq(skb);
-    dev->trans_start = jiffies;
+    netif_trans_update(dev);
     netif_start_queue(dev);
 }
 
@@ -1187,7 +1187,7 @@ static void smc_tx_timeout(struct net_device *dev)
                  inw(ioaddr)&0xff, inw(ioaddr + 2));
     dev->stats.tx_errors++;
     smc_reset(dev);
-    dev->trans_start = jiffies; /* prevent tx timeout */
+    netif_trans_update(dev); /* prevent tx timeout */
     smc->saved_skb = NULL;
     netif_wake_queue(dev);
 }
index c5ed27c54724a9a118f46f4316ad96ae71dc5a7c..18ac52ded6965a5f5dbe811aa33d6ba11b19686a 100644 (file)
@@ -619,7 +619,7 @@ static void smc_hardware_send_pkt(unsigned long data)
        SMC_SET_MMU_CMD(lp, MC_ENQUEUE);
        smc_special_unlock(&lp->lock, flags);
 
-       dev->trans_start = jiffies;
+       netif_trans_update(dev);
        dev->stats.tx_packets++;
        dev->stats.tx_bytes += len;
 
@@ -1364,7 +1364,7 @@ static void smc_timeout(struct net_device *dev)
                schedule_work(&lp->phy_configure);
 
        /* We can accept TX packets again */
-       dev->trans_start = jiffies; /* prevent tx timeout */
+       netif_trans_update(dev); /* prevent tx timeout */
        netif_wake_queue(dev);
 }
 
index 9cc45649f477fbf241d7e3741cd7772b46f1f4c7..a2371aa14a49f840702b5867f5ad80f6b520ee16 100644 (file)
@@ -6431,7 +6431,7 @@ static int niu_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
 
 static void niu_netif_stop(struct niu *np)
 {
-       np->dev->trans_start = jiffies; /* prevent tx timeout */
+       netif_trans_update(np->dev);    /* prevent tx timeout */
 
        niu_disable_napi(np);
 
index 2437227712dcd0ee5fd0404113e35527646a8b76..d6ad0fbd054e10bf34d48d2f522b0660781de02d 100644 (file)
@@ -226,7 +226,7 @@ static void gem_put_cell(struct gem *gp)
 
 static inline void gem_netif_stop(struct gem *gp)
 {
-       gp->dev->trans_start = jiffies; /* prevent tx timeout */
+       netif_trans_update(gp->dev);    /* prevent tx timeout */
        napi_disable(&gp->napi);
        netif_tx_disable(gp->dev);
 }
index af11ed1e0bcc09b4ed4fa5e94df8945fab4d581e..158213cd6cddf98c4f2f511a40e31487e3a70ac0 100644 (file)
@@ -949,7 +949,7 @@ static void dwceqos_adjust_link(struct net_device *ndev)
 
        if (status_change) {
                if (phydev->link) {
-                       lp->ndev->trans_start = jiffies;
+                       netif_trans_update(lp->ndev);
                        dwceqos_link_up(lp);
                } else {
                        dwceqos_link_down(lp);
@@ -2203,7 +2203,7 @@ static int dwceqos_start_xmit(struct sk_buff *skb, struct net_device *ndev)
        netdev_sent_queue(ndev, skb->len);
        spin_unlock_bh(&lp->tx_lock);
 
-       ndev->trans_start = jiffies;
+       netif_trans_update(ndev);
        return 0;
 
 tx_error:
index 2524a69db318961ec80dd5c4f3701280c050f013..7452b5f9d02427469e58caf516c02b6de4a44a4e 100644 (file)
@@ -1701,7 +1701,7 @@ static netdev_tx_t bdx_tx_transmit(struct sk_buff *skb,
 
 #endif
 #ifdef BDX_LLTX
-       ndev->trans_start = jiffies; /* NETIF_F_LLTX driver :( */
+       netif_trans_update(ndev); /* NETIF_F_LLTX driver :( */
 #endif
        ndev->stats.tx_packets++;
        ndev->stats.tx_bytes += skb->len;
index 68577ee2e64ae1c82cb2e84b2ef77cca6cf3bda8..4b08a2f52b3e6074218fb6ba876a639855818d3d 100644 (file)
@@ -1389,7 +1389,7 @@ static netdev_tx_t cpsw_ndo_start_xmit(struct sk_buff *skb,
        struct cpsw_priv *priv = netdev_priv(ndev);
        int ret;
 
-       ndev->trans_start = jiffies;
+       netif_trans_update(ndev);
 
        if (skb_padto(skb, CPSW_MIN_PACKET_SIZE)) {
                cpsw_err(priv, tx_err, "packet pad failed\n");
index 1d0942c531209ea5b581ede060398b33fa7d61a7..32516661f180bcc1ad7e3bb37a8d130c717290bd 100644 (file)
@@ -1272,7 +1272,7 @@ static int netcp_ndo_start_xmit(struct sk_buff *skb, struct net_device *ndev)
        if (ret)
                goto drop;
 
-       ndev->trans_start = jiffies;
+       netif_trans_update(ndev);
 
        /* Check Tx pool count & stop subqueue if needed */
        desc_count = knav_pool_count(netcp->tx_pool);
@@ -1788,7 +1788,7 @@ static void netcp_ndo_tx_timeout(struct net_device *ndev)
 
        dev_err(netcp->ndev_dev, "transmit timed out tx descs(%d)\n", descs);
        netcp_process_tx_compl_packets(netcp, netcp->tx_pool_size);
-       ndev->trans_start = jiffies;
+       netif_trans_update(ndev);
        netif_tx_wake_all_queues(ndev);
 }
 
index a274cd49afe954442bbd3bf647be71a92d0087ee..561703317312e2bbcc1047eeb7f2271b0895be7a 100644 (file)
@@ -1007,7 +1007,7 @@ static void tlan_tx_timeout(struct net_device *dev)
        tlan_reset_lists(dev);
        tlan_read_and_clear_stats(dev, TLAN_IGNORE);
        tlan_reset_adapter(dev);
-       dev->trans_start = jiffies; /* prevent tx timeout */
+       netif_trans_update(dev); /* prevent tx timeout */
        netif_wake_queue(dev);
 
 }
index 298e059d04986b90b3132d453d453d30f8abe062..0bb98bc70c9dc347c4beb64728a00cab1dce3a66 100644 (file)
@@ -1883,7 +1883,7 @@ static int tile_net_tx(struct sk_buff *skb, struct net_device *dev)
 
 
        /* Save the timestamp. */
-       dev->trans_start = jiffies;
+       netif_trans_update(dev);
 
 
 #ifdef TILE_NET_PARANOIA
index 67610270d171a69d5e1ecf5e0c027fe98d053bba..36a6e8b54d9415d65bf1b6d2804a53949372eaa6 100644 (file)
@@ -705,7 +705,7 @@ spider_net_prepare_tx_descr(struct spider_net_card *card,
        wmb();
        descr->prev->hwdescr->next_descr_addr = descr->bus_addr;
 
-       card->netdev->trans_start = jiffies; /* set netdev watchdog timer */
+       netif_trans_update(card->netdev); /* set netdev watchdog timer */
        return 0;
 }
 
index 2b7550c43f7800fe36e54fafacabfcd921c408f4..9d14731cdcb10ff28d839694ba7b3113d505708a 100644 (file)
@@ -1758,7 +1758,7 @@ static void rhine_reset_task(struct work_struct *work)
 
        spin_unlock_bh(&rp->lock);
 
-       dev->trans_start = jiffies; /* prevent tx timeout */
+       netif_trans_update(dev); /* prevent tx timeout */
        dev->stats.tx_errors++;
        netif_wake_queue(dev);
 
index 8ed0c7735ee356d37babc238c70b1f7c0c5a01d7..ec1889ce38a384f1311286c5835f61bc1f26bf40 100644 (file)
@@ -782,7 +782,7 @@ static void w5100_restart(struct net_device *ndev)
        w5100_hw_reset(priv);
        w5100_hw_start(priv);
        ndev->stats.tx_errors++;
-       ndev->trans_start = jiffies;
+       netif_trans_update(ndev);
        netif_wake_queue(ndev);
 }
 
index 8da7b930ff595aa6ed79ddedbd5461b84dad6003..0b37ce9f28f1d4493bef915344d855f296e29953 100644 (file)
@@ -362,7 +362,7 @@ static void w5300_tx_timeout(struct net_device *ndev)
        w5300_hw_reset(priv);
        w5300_hw_start(priv);
        ndev->stats.tx_errors++;
-       ndev->trans_start = jiffies;
+       netif_trans_update(ndev);
        netif_wake_queue(ndev);
 }
 
index 5a1068df7038c5faf5d67742139ea1d0d53f0845..73970871202283368766f764a56fb7503a31eb0e 100644 (file)
@@ -584,7 +584,7 @@ static void temac_device_reset(struct net_device *ndev)
                dev_err(&ndev->dev, "Error setting TEMAC options\n");
 
        /* Init Driver variable */
-       ndev->trans_start = jiffies; /* prevent tx timeout */
+       netif_trans_update(ndev); /* prevent tx timeout */
 }
 
 static void temac_adjust_link(struct net_device *ndev)
index 4684644703ccee1d4ad2c68439d48ac618b5c3b0..8c7f5be51e620be8e33954746f2174c046d5bccc 100644 (file)
@@ -508,7 +508,7 @@ static void axienet_device_reset(struct net_device *ndev)
        axienet_set_multicast_list(ndev);
        axienet_setoptions(ndev, lp->options);
 
-       ndev->trans_start = jiffies;
+       netif_trans_update(ndev);
 }
 
 /**
index e324b30923800f260a87a5f32e6089eacdbea1a1..3cee84a24815d7fec3f089b4c4c3d65519b6e1ae 100644 (file)
@@ -531,7 +531,7 @@ static void xemaclite_tx_timeout(struct net_device *dev)
        }
 
        /* To exclude tx timeout */
-       dev->trans_start = jiffies; /* prevent tx timeout */
+       netif_trans_update(dev); /* prevent tx timeout */
 
        /* We're all ready to go. Start the queue */
        netif_wake_queue(dev);
@@ -563,7 +563,7 @@ static void xemaclite_tx_handler(struct net_device *dev)
                        dev->stats.tx_bytes += lp->deferred_skb->len;
                        dev_kfree_skb_irq(lp->deferred_skb);
                        lp->deferred_skb = NULL;
-                       dev->trans_start = jiffies; /* prevent tx timeout */
+                       netif_trans_update(dev); /* prevent tx timeout */
                        netif_wake_queue(dev);
                }
        }
index d56f8693202bb45ea79e6eedf5141cf40d97b53f..7b44968e02e6c2f48709e888e75018d350005155 100644 (file)
@@ -1199,7 +1199,7 @@ xirc2ps_tx_timeout_task(struct work_struct *work)
        struct net_device *dev = local->dev;
     /* reset the card */
     do_reset(dev,1);
-    dev->trans_start = jiffies; /* prevent tx timeout */
+    netif_trans_update(dev); /* prevent tx timeout */
     netif_wake_queue(dev);
 }
 
index 7ad3d04314c55b6eaa35c93f2c72481cdf9965b1..f4e69261a3ce0cadc09532d255551f434a7c3656 100644 (file)
@@ -718,7 +718,7 @@ fjes_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
 
                                        ret = NETDEV_TX_OK;
                                } else {
-                                       netdev->trans_start = jiffies;
+                                       netif_trans_update(netdev);
                                        netif_tx_stop_queue(cur_queue);
 
                                        if (!work_pending(&adapter->tx_stall_task))
index c685937e1de3db299b347f93234c36834b2eb2b1..1dfe2304daa76431d32a153bae66a82ac0e96c6e 100644 (file)
@@ -519,7 +519,7 @@ static void ax_encaps(struct net_device *dev, unsigned char *icp, int len)
        dev->stats.tx_packets++;
        dev->stats.tx_bytes += actual;
 
-       ax->dev->trans_start = jiffies;
+       netif_trans_update(ax->dev);
        ax->xleft = count - actual;
        ax->xhead = ax->xbuff + actual;
 }
index ce88df33fe17b20237b3f4f2e0c9e1ca7b4b63a3..b8083161ef461d87c613323c2893cac4ba2550b6 100644 (file)
@@ -1669,7 +1669,7 @@ static netdev_tx_t scc_net_tx(struct sk_buff *skb, struct net_device *dev)
                dev_kfree_skb(skb_del);
        }
        skb_queue_tail(&scc->tx_queue, skb);
-       dev->trans_start = jiffies;
+       netif_trans_update(dev);
        
 
        /*
index 1a4729c36aa49d93f8e536cd98d4731df704621d..aaff07c10058520fdba0b9e419bc95d8219a381c 100644 (file)
@@ -601,7 +601,7 @@ static netdev_tx_t yam_send_packet(struct sk_buff *skb,
                return ax25_ip_xmit(skb);
 
        skb_queue_tail(&yp->send_queue, skb);
-       dev->trans_start = jiffies;
+       netif_trans_update(dev);
        return NETDEV_TX_OK;
 }
 
index 64bb44d5d8672a2f078a69074a1c9e6e9d4fda27..c285eafd3f1c11d726daf67aaff37b9abf7da6fb 100644 (file)
@@ -1427,7 +1427,7 @@ static netdev_tx_t ali_ircc_fir_hard_xmit(struct sk_buff *skb,
                /* Check for empty frame */
                if (!skb->len) {
                        ali_ircc_change_speed(self, speed); 
-                       dev->trans_start = jiffies;
+                       netif_trans_update(dev);
                        spin_unlock_irqrestore(&self->lock, flags);
                        dev_kfree_skb(skb);
                        return NETDEV_TX_OK;
@@ -1533,7 +1533,7 @@ static netdev_tx_t ali_ircc_fir_hard_xmit(struct sk_buff *skb,
        /* Restore bank register */
        switch_bank(iobase, BANK0);
 
-       dev->trans_start = jiffies;
+       netif_trans_update(dev);
        spin_unlock_irqrestore(&self->lock, flags);
        dev_kfree_skb(skb);
 
@@ -1946,7 +1946,7 @@ static netdev_tx_t ali_ircc_sir_hard_xmit(struct sk_buff *skb,
                /* Check for empty frame */
                if (!skb->len) {
                        ali_ircc_change_speed(self, speed); 
-                       dev->trans_start = jiffies;
+                       netif_trans_update(dev);
                        spin_unlock_irqrestore(&self->lock, flags);
                        dev_kfree_skb(skb);
                        return NETDEV_TX_OK;
@@ -1966,7 +1966,7 @@ static netdev_tx_t ali_ircc_sir_hard_xmit(struct sk_buff *skb,
        /* Turn on transmit finished interrupt. Will fire immediately!  */
        outb(UART_IER_THRI, iobase+UART_IER); 
 
-       dev->trans_start = jiffies;
+       netif_trans_update(dev);
        spin_unlock_irqrestore(&self->lock, flags);
 
        dev_kfree_skb(skb);
index 303c4bd26e17953de1693475b042266eac8dca90..be5bb0b7f29ca5f90d622523ff97baaad9921b53 100644 (file)
@@ -531,7 +531,7 @@ static void bfin_sir_send_work(struct work_struct *work)
        bfin_sir_dma_tx_chars(dev);
 #endif
        bfin_sir_enable_tx(port);
-       dev->trans_start = jiffies;
+       netif_trans_update(dev);
 }
 
 static int bfin_sir_hard_xmit(struct sk_buff *skb, struct net_device *dev)
index 25f21968fa5c61506af3ed49fc0d9a7fa4ad15c4..a198946bc54fda6ce8df93c2d4c12b22d32eb117 100644 (file)
@@ -429,7 +429,7 @@ static netdev_tx_t irda_usb_hard_xmit(struct sk_buff *skb,
                         * do an extra memcpy and increment packet counters...
                         * Jean II */
                        irda_usb_change_speed_xbofs(self);
-                       netdev->trans_start = jiffies;
+                       netif_trans_update(netdev);
                        /* Will netif_wake_queue() in callback */
                        goto drop;
                }
@@ -526,7 +526,7 @@ static netdev_tx_t irda_usb_hard_xmit(struct sk_buff *skb,
                netdev->stats.tx_packets++;
                 netdev->stats.tx_bytes += skb->len;
                
-               netdev->trans_start = jiffies;
+               netif_trans_update(netdev);
        }
        spin_unlock_irqrestore(&self->lock, flags);
        
index dc0dbd8dd0b5b293d05c1bfd121410a0be35dc42..9ef13d8ed813f243511c9a11993dc73f7989b075 100644 (file)
@@ -1399,7 +1399,7 @@ static netdev_tx_t nsc_ircc_hard_xmit_sir(struct sk_buff *skb,
                                 * to make sure packets gets through the
                                 * proper xmit handler - Jean II */
                        }
-                       dev->trans_start = jiffies;
+                       netif_trans_update(dev);
                        spin_unlock_irqrestore(&self->lock, flags);
                        dev_kfree_skb(skb);
                        return NETDEV_TX_OK;
@@ -1424,7 +1424,7 @@ static netdev_tx_t nsc_ircc_hard_xmit_sir(struct sk_buff *skb,
        /* Restore bank register */
        outb(bank, iobase+BSR);
 
-       dev->trans_start = jiffies;
+       netif_trans_update(dev);
        spin_unlock_irqrestore(&self->lock, flags);
 
        dev_kfree_skb(skb);
@@ -1470,7 +1470,7 @@ static netdev_tx_t nsc_ircc_hard_xmit_fir(struct sk_buff *skb,
                                 * the speed change has been done.
                                 * Jean II */
                        }
-                       dev->trans_start = jiffies;
+                       netif_trans_update(dev);
                        spin_unlock_irqrestore(&self->lock, flags);
                        dev_kfree_skb(skb);
                        return NETDEV_TX_OK;
@@ -1553,7 +1553,7 @@ static netdev_tx_t nsc_ircc_hard_xmit_fir(struct sk_buff *skb,
        /* Restore bank register */
        outb(bank, iobase+BSR);
 
-       dev->trans_start = jiffies;
+       netif_trans_update(dev);
        spin_unlock_irqrestore(&self->lock, flags);
        dev_kfree_skb(skb);
 
index b455ffe8850ceda13255ad13e5a52d236b3ae8b2..dcf92ba8087257d3ffe8c0a8dab4d5475cb43ea4 100644 (file)
@@ -862,7 +862,7 @@ static void smsc_ircc_timeout(struct net_device *dev)
        spin_lock_irqsave(&self->lock, flags);
        smsc_ircc_sir_start(self);
        smsc_ircc_change_speed(self, self->io.speed);
-       dev->trans_start = jiffies; /* prevent tx timeout */
+       netif_trans_update(dev); /* prevent tx timeout */
        netif_wake_queue(dev);
        spin_unlock_irqrestore(&self->lock, flags);
 }
index 83cc48a01802b76fe2a53923e13263cea80e484f..42da094b68ddfade0c7b43f527d2c8af56b17ec5 100644 (file)
@@ -718,7 +718,7 @@ static void stir_send(struct stir_cb *stir, struct sk_buff *skb)
 
        stir->netdev->stats.tx_packets++;
        stir->netdev->stats.tx_bytes += skb->len;
-       stir->netdev->trans_start = jiffies;
+       netif_trans_update(stir->netdev);
        pr_debug("send %d (%d)\n", skb->len, wraplen);
 
        if (usb_bulk_msg(stir->usbdev, usb_sndbulkpipe(stir->usbdev, 1),
index 6960d4cd3caed83e1e11dc661c1faf492031b20f..ca4442a9d63109820aad26ed9aa448847b1e5da2 100644 (file)
@@ -774,7 +774,7 @@ static netdev_tx_t via_ircc_hard_xmit_sir(struct sk_buff *skb,
                /* Check for empty frame */
                if (!skb->len) {
                        via_ircc_change_speed(self, speed);
-                       dev->trans_start = jiffies;
+                       netif_trans_update(dev);
                        dev_kfree_skb(skb);
                        return NETDEV_TX_OK;
                } else
@@ -821,7 +821,7 @@ static netdev_tx_t via_ircc_hard_xmit_sir(struct sk_buff *skb,
        RXStart(iobase, OFF);
        TXStart(iobase, ON);
 
-       dev->trans_start = jiffies;
+       netif_trans_update(dev);
        spin_unlock_irqrestore(&self->lock, flags);
        dev_kfree_skb(skb);
        return NETDEV_TX_OK;
@@ -849,7 +849,7 @@ static netdev_tx_t via_ircc_hard_xmit_fir(struct sk_buff *skb,
        if ((speed != self->io.speed) && (speed != -1)) {
                if (!skb->len) {
                        via_ircc_change_speed(self, speed);
-                       dev->trans_start = jiffies;
+                       netif_trans_update(dev);
                        dev_kfree_skb(skb);
                        return NETDEV_TX_OK;
                } else
@@ -869,7 +869,7 @@ static netdev_tx_t via_ircc_hard_xmit_fir(struct sk_buff *skb,
        via_ircc_dma_xmit(self, iobase);
 //F01   }
 //F01   if (self->tx_fifo.free < (MAX_TX_WINDOW -1 )) netif_wake_queue(self->netdev);
-       dev->trans_start = jiffies;
+       netif_trans_update(dev);
        dev_kfree_skb(skb);
        spin_unlock_irqrestore(&self->lock, flags);
        return NETDEV_TX_OK;
index a17d86a5773477fba7059600aa9a9291ef0106b6..9ed6d1c1ee45f15b2686b7c4102045b3acead55c 100644 (file)
@@ -407,7 +407,7 @@ static void sl_encaps(struct slip *sl, unsigned char *icp, int len)
        set_bit(TTY_DO_WRITE_WAKEUP, &sl->tty->flags);
        actual = sl->tty->ops->write(sl->tty, sl->xbuff, count);
 #ifdef SL_CHECK_TRANSMIT
-       sl->dev->trans_start = jiffies;
+       netif_trans_update(sl->dev);
 #endif
        sl->xleft = count - actual;
        sl->xhead = sl->xbuff + actual;
index 4e2b26a88b15f03ba8302d5d7a83d1a5b1a4d4ea..d9ca05d3ac8eadb17a0ec12d539c50dde7fb151b 100644 (file)
@@ -376,7 +376,7 @@ static int catc_tx_run(struct catc *catc)
        catc->tx_idx = !catc->tx_idx;
        catc->tx_ptr = 0;
 
-       catc->netdev->trans_start = jiffies;
+       netif_trans_update(catc->netdev);
        return status;
 }
 
@@ -389,7 +389,7 @@ static void catc_tx_done(struct urb *urb)
        if (status == -ECONNRESET) {
                dev_dbg(&urb->dev->dev, "Tx Reset.\n");
                urb->status = 0;
-               catc->netdev->trans_start = jiffies;
+               netif_trans_update(catc->netdev);
                catc->netdev->stats.tx_errors++;
                clear_bit(TX_RUNNING, &catc->flags);
                netif_wake_queue(catc->netdev);
index f64b25c221e83b63704db0d856132ca96b7e606c..770212baaf05ddb032967730acc6b0ff46ec8f40 100644 (file)
@@ -938,7 +938,7 @@ static void kaweth_tx_timeout(struct net_device *net)
 
        dev_warn(&net->dev, "%s: Tx timed out. Resetting.\n", net->name);
        kaweth->stats.tx_errors++;
-       net->trans_start = jiffies;
+       netif_trans_update(net);
 
        usb_unlink_urb(kaweth->tx_urb);
 }
index f64778ad97535118d5b0705c1a5afa04ab57677c..6a9d474b08b21cb7e9489906f44c17a63cc3bd39 100644 (file)
@@ -3045,7 +3045,7 @@ gso_skb:
        ret = usb_submit_urb(urb, GFP_ATOMIC);
        switch (ret) {
        case 0:
-               dev->net->trans_start = jiffies;
+               netif_trans_update(dev->net);
                lan78xx_queue_skb(&dev->txq, skb, tx_start);
                if (skb_queue_len(&dev->txq) >= dev->tx_qlen)
                        netif_stop_queue(dev->net);
@@ -3729,7 +3729,7 @@ int lan78xx_resume(struct usb_interface *intf)
                                usb_free_urb(res);
                                usb_autopm_put_interface_async(dev->intf);
                        } else {
-                               dev->net->trans_start = jiffies;
+                               netif_trans_update(dev->net);
                                lan78xx_queue_skb(&dev->txq, skb, tx_start);
                        }
                }
index 82129eef77748f25ffe05f4754f4f6df81e3e8cd..36cd7f016a8de63490dfcbe89e38f6d9e4e4b7a6 100644 (file)
@@ -615,7 +615,7 @@ static void write_bulk_callback(struct urb *urb)
                break;
        }
 
-       net->trans_start = jiffies; /* prevent tx timeout */
+       netif_trans_update(net); /* prevent tx timeout */
        netif_wake_queue(net);
 }
 
index d37b7dce2d405af079e8067ad032f0acdbdbbf9b..7c72bfac89d08df2f6c873ffe0a11e51364e9547 100644 (file)
@@ -451,7 +451,7 @@ static void write_bulk_callback(struct urb *urb)
        if (status)
                dev_info(&urb->dev->dev, "%s: Tx status %d\n",
                         dev->netdev->name, status);
-       dev->netdev->trans_start = jiffies;
+       netif_trans_update(dev->netdev);
        netif_wake_queue(dev->netdev);
 }
 
@@ -694,7 +694,7 @@ static netdev_tx_t rtl8150_start_xmit(struct sk_buff *skb,
        } else {
                netdev->stats.tx_packets++;
                netdev->stats.tx_bytes += skb->len;
-               netdev->trans_start = jiffies;
+               netif_trans_update(netdev);
        }
 
        return NETDEV_TX_OK;
index 4837854fd43c5372e86b53d23af8e0e6a8fbc5ea..61ba464049374593316e1c0b869774861ee79b5e 100644 (file)
@@ -1416,7 +1416,7 @@ netdev_tx_t usbnet_start_xmit (struct sk_buff *skb,
                          "tx: submit urb err %d\n", retval);
                break;
        case 0:
-               net->trans_start = jiffies;
+               netif_trans_update(net);
                __usbnet_queue_skb(&dev->txq, skb, tx_start);
                if (dev->txq.qlen >= TX_QLEN (dev))
                        netif_stop_queue (net);
@@ -1845,7 +1845,7 @@ int usbnet_resume (struct usb_interface *intf)
                                usb_free_urb(res);
                                usb_autopm_put_interface_async(dev->intf);
                        } else {
-                               dev->net->trans_start = jiffies;
+                               netif_trans_update(dev->net);
                                __skb_queue_tail(&dev->txq, skb);
                        }
                }
index 848ea6a399f236b14cc5d9a79dd38038e0331aec..b87fe0a01c69ff3bb53b609632f5016eb8806073 100644 (file)
@@ -739,7 +739,7 @@ static char *cosa_net_setup_rx(struct channel_data *chan, int size)
                chan->netdev->stats.rx_dropped++;
                return NULL;
        }
-       chan->netdev->trans_start = jiffies;
+       netif_trans_update(chan->netdev);
        return skb_put(chan->rx_skb, size);
 }
 
index 69b994f3b8c528406ef3f28c02147b0070a074e3..3c9cbf908ec73cd95a75d59a289eef5e68e5f414 100644 (file)
@@ -831,7 +831,7 @@ fst_tx_dma_complete(struct fst_card_info *card, struct fst_port_info *port,
                DMA_OWN | TX_STP | TX_ENP);
        dev->stats.tx_packets++;
        dev->stats.tx_bytes += len;
-       dev->trans_start = jiffies;
+       netif_trans_update(dev);
 }
 
 /*
@@ -1389,7 +1389,7 @@ do_bottom_half_tx(struct fst_card_info *card)
                                                DMA_OWN | TX_STP | TX_ENP);
                                        dev->stats.tx_packets++;
                                        dev->stats.tx_bytes += skb->len;
-                                       dev->trans_start = jiffies;
+                                       netif_trans_update(dev);
                                } else {
                                        /* Or do it through dma */
                                        memcpy(card->tx_dma_handle_host,
@@ -2258,7 +2258,7 @@ fst_tx_timeout(struct net_device *dev)
            card->card_no, port->index);
        fst_issue_cmd(port, ABORTTX);
 
-       dev->trans_start = jiffies;
+       netif_trans_update(dev);
        netif_wake_queue(dev);
        port->start = 0;
 }
index bb33b242ab48d66cd354c5626c8fb0de81be125e..299140c04556979b9fc75b2a43211b325c81243a 100644 (file)
@@ -2105,7 +2105,7 @@ static void lmc_driver_timeout(struct net_device *dev)
     sc->lmc_device->stats.tx_errors++;
     sc->extra_stats.tx_ProcTimeout++; /* -baz */
 
-    dev->trans_start = jiffies; /* prevent tx timeout */
+    netif_trans_update(dev); /* prevent tx timeout */
 
 bug_out:
 
index 8fef8d83436ddef9682df26e8ed2af6f2ae13377..d98c7e57137d22edd8d2fa8f20d8632ca621ab04 100644 (file)
@@ -860,9 +860,9 @@ prepare_to_send( struct sk_buff  *skb,  struct net_device  *dev )
 
        outb( inb( dev->base_addr + CSR0 ) | TR_REQ,  dev->base_addr + CSR0 );
 #ifdef CONFIG_SBNI_MULTILINE
-       nl->master->trans_start = jiffies;
+       netif_trans_update(nl->master);
 #else
-       dev->trans_start = jiffies;
+       netif_trans_update(dev);
 #endif
 }
 
@@ -889,10 +889,10 @@ drop_xmit_queue( struct net_device  *dev )
        nl->state &= ~(FL_WAIT_ACK | FL_NEED_RESEND);
 #ifdef CONFIG_SBNI_MULTILINE
        netif_start_queue( nl->master );
-       nl->master->trans_start = jiffies;
+       netif_trans_update(nl->master);
 #else
        netif_start_queue( dev );
-       dev->trans_start = jiffies;
+       netif_trans_update(dev);
 #endif
 }
 
index a9970f1af976a5b0c34d41be8df61ed47365713b..bb74f4b9a02fb5dd3fe1ff1ad0ec112430b46d99 100644 (file)
@@ -334,7 +334,7 @@ int i2400m_net_tx(struct i2400m *i2400m, struct net_device *net_dev,
        d_fnstart(3, dev, "(i2400m %p net_dev %p skb %p)\n",
                  i2400m, net_dev, skb);
        /* FIXME: check eth hdr, only IPv4 is routed by the device as of now */
-       net_dev->trans_start = jiffies;
+       netif_trans_update(net_dev);
        i2400m_tx_prep_header(skb);
        d_printf(3, dev, "NETTX: skb %p sending %d bytes to radio\n",
                 skb, skb->len);
index 4bd9e2b97e860e6e02e0bca0a98986d4bc80eb3d..55456f7502293252aa107706f56562dc0b5ce59b 100644 (file)
@@ -2026,7 +2026,7 @@ static int mpi_send_packet (struct net_device *dev)
        } else {
                *payloadLen = cpu_to_le16(len - sizeof(etherHead));
 
-               dev->trans_start = jiffies;
+               netif_trans_update(dev);
 
                /* copy data into airo dma buffer */
                memcpy(sendbuf, buffer, len);
@@ -2107,7 +2107,7 @@ static void airo_end_xmit(struct net_device *dev) {
 
        i = 0;
        if ( status == SUCCESS ) {
-               dev->trans_start = jiffies;
+               netif_trans_update(dev);
                for (; i < MAX_FIDS / 2 && (priv->fids[i] & 0xffff0000); i++);
        } else {
                priv->fids[fid] &= 0xffff;
@@ -2174,7 +2174,7 @@ static void airo_end_xmit11(struct net_device *dev) {
 
        i = MAX_FIDS / 2;
        if ( status == SUCCESS ) {
-               dev->trans_start = jiffies;
+               netif_trans_update(dev);
                for (; i < MAX_FIDS && (priv->fids[i] & 0xffff0000); i++);
        } else {
                priv->fids[fid] &= 0xffff;
index e1e42ed6c41287930098674950b93e56d6452df5..bfa542c8d6f1a2b4f98ac2c419326ceb3ac7a17d 100644 (file)
@@ -2954,7 +2954,7 @@ static int __ipw2100_tx_process(struct ipw2100_priv *priv)
 
                /* A packet was processed by the hardware, so update the
                 * watchdog */
-               priv->net_dev->trans_start = jiffies;
+               netif_trans_update(priv->net_dev);
 
                break;
 
index dac13cf42e9fbcfd08e37841c996cd62a1f9f05a..5adb7cefb2feb3804cd1065f0ebd30daf7699954 100644 (file)
@@ -7707,7 +7707,7 @@ static void ipw_handle_data_packet(struct ipw_priv *priv,
        struct ipw_rx_packet *pkt = (struct ipw_rx_packet *)rxb->skb->data;
 
        /* We received data from the HW, so stop the watchdog */
-       dev->trans_start = jiffies;
+       netif_trans_update(dev);
 
        /* We only process data packets if the
         * interface is open */
@@ -7770,7 +7770,7 @@ static void ipw_handle_data_packet_monitor(struct ipw_priv *priv,
        unsigned short len = le16_to_cpu(pkt->u.frame.length);
 
        /* We received data from the HW, so stop the watchdog */
-       dev->trans_start = jiffies;
+       netif_trans_update(dev);
 
        /* We only process data packets if the
         * interface is open */
@@ -7952,7 +7952,7 @@ static void ipw_handle_promiscuous_rx(struct ipw_priv *priv,
                return;
 
        /* We received data from the HW, so stop the watchdog */
-       dev->trans_start = jiffies;
+       netif_trans_update(dev);
 
        if (unlikely((len + IPW_RX_FRAME_SIZE) > skb_tailroom(rxb->skb))) {
                dev->stats.rx_errors++;
index 515aa3f993f3dd8d1a65936472bfa6b00f4420de..a8a9bd8e176a35f3e56f50f32f8fe00c685d6440 100644 (file)
@@ -1794,7 +1794,7 @@ static int prism2_transmit(struct net_device *dev, int idx)
                netif_wake_queue(dev);
                return -1;
        }
-       dev->trans_start = jiffies;
+       netif_trans_update(dev);
 
        /* Since we did not wait for command completion, the card continues
         * to process on the background and we will finish handling when
index 7b5c554323c73ab40caddb47ca965560d787d127..7afe2004e93064f8954a5dcd8940f06b4f86dab5 100644 (file)
@@ -1794,7 +1794,7 @@ void orinoco_reset(struct work_struct *work)
                        printk(KERN_ERR "%s: orinoco_reset: Error %d reenabling card\n",
                               dev->name, err);
                } else
-                       dev->trans_start = jiffies;
+                       netif_trans_update(dev);
        }
 
        orinoco_unlock_irq(priv);
index f2cd513d54b2c21673552470efd6083d3bc5dcbe..56f109bc83945d351e35888dd1091fcd6c42ac28 100644 (file)
@@ -1275,7 +1275,7 @@ static netdev_tx_t ezusb_xmit(struct sk_buff *skb, struct net_device *dev)
                goto busy;
        }
 
-       dev->trans_start = jiffies;
+       netif_trans_update(dev);
        stats->tx_bytes += skb->len;
        goto ok;
 
index 517653b3adabd8481edc73cd8eb08046e44f8484..78c532f0d286b249e9c0dd6e269351e83ad41128 100644 (file)
@@ -317,7 +317,7 @@ void mwifiex_set_trans_start(struct net_device *dev)
        for (i = 0; i < dev->num_tx_queues; i++)
                netdev_get_tx_queue(dev, i)->trans_start = jiffies;
 
-       dev->trans_start = jiffies;
+       netif_trans_update(dev);
 }
 
 /*
index 99de07d14939d3a0ad6f4501c7c18f5cd5a16383..13fd734b61ece4b4b7756da70dbda1e664665db0 100644 (file)
@@ -1287,7 +1287,7 @@ static void wl3501_tx_timeout(struct net_device *dev)
                printk(KERN_ERR "%s: Error %d resetting card on Tx timeout!\n",
                       dev->name, rc);
        else {
-               dev->trans_start = jiffies; /* prevent tx timeout */
+               netif_trans_update(dev); /* prevent tx timeout */
                netif_wake_queue(dev);
        }
 }
index 6f5c793a7855e90f7255633e15baa0608676c957..dea049b2556f337ed1f1504cef7e834882035707 100644 (file)
@@ -845,7 +845,7 @@ static void zd1201_tx_timeout(struct net_device *dev)
        usb_unlink_urb(zd->tx_urb);
        dev->stats.tx_errors++;
        /* Restart the timeout to quiet the watchdog: */
-       dev->trans_start = jiffies; /* prevent tx timeout */
+       netif_trans_update(dev); /* prevent tx timeout */
 }
 
 static int zd1201_set_mac_address(struct net_device *dev, void *p)
index c3e22523faf36b2b21aa83dae388d2f2abf17206..ad17fc5883f61f61bc509f6d95754c881fca1c24 100644 (file)
@@ -642,7 +642,7 @@ static void ctcmpc_send_sweep_req(struct channel *rch)
 
        kfree(header);
 
-       dev->trans_start = jiffies;
+       netif_trans_update(dev);
        skb_queue_tail(&ch->sweep_queue, sweep_skb);
 
        fsm_addtimer(&ch->sweep_timer, 100, CTC_EVENT_RSWEEP_TIMER, ch);
@@ -911,7 +911,7 @@ static int ctcm_tx(struct sk_buff *skb, struct net_device *dev)
        if (ctcm_test_and_set_busy(dev))
                return NETDEV_TX_BUSY;
 
-       dev->trans_start = jiffies;
+       netif_trans_update(dev);
        if (ctcm_transmit_skb(priv->channel[CTCM_WRITE], skb) != 0)
                return NETDEV_TX_BUSY;
        return NETDEV_TX_OK;
@@ -994,7 +994,7 @@ static int ctcmpc_tx(struct sk_buff *skb, struct net_device *dev)
                                        goto done;
        }
 
-       dev->trans_start = jiffies;
+       netif_trans_update(dev);
        if (ctcmpc_transmit_skb(priv->channel[CTCM_WRITE], skb) != 0) {
                CTCM_DBF_TEXT_(MPC_ERROR, CTC_DBF_ERROR,
                        "%s(%s): device error - dropped",
index edf16bfba8eeafa78a41eea97a3ac0664cbd3e9f..c103fc7efe9fd4384edaa6365d83805267733d07 100644 (file)
@@ -671,7 +671,7 @@ static void ctcmpc_send_sweep_resp(struct channel *rch)
 
        kfree(header);
 
-       dev->trans_start = jiffies;
+       netif_trans_update(dev);
        skb_queue_tail(&ch->sweep_queue, sweep_skb);
 
        fsm_addtimer(&ch->sweep_timer, 100, CTC_EVENT_RSWEEP_TIMER, ch);
index 0ba3a2f81750f6785bdd107613d9a98069e88662..b0e8ffdf864b049c1d72797c039b91a6e29d373e 100644 (file)
@@ -1407,7 +1407,7 @@ static int netiucv_tx(struct sk_buff *skb, struct net_device *dev)
                IUCV_DBF_TEXT(data, 2, "EBUSY from netiucv_tx\n");
                return NETDEV_TX_BUSY;
        }
-       dev->trans_start = jiffies;
+       netif_trans_update(dev);
        rc = netiucv_transmit_skb(privptr->conn, skb);
        netiucv_clear_busy(dev);
        return rc ? NETDEV_TX_BUSY : NETDEV_TX_OK;
index 9b7cc7dc7cb82b7a35af095a812762b40e848c18..13a5ddc2bea577c68d17ebf930893194341f27a1 100644 (file)
@@ -1792,7 +1792,7 @@ static short _rtl92e_tx(struct net_device *dev, struct sk_buff *skb)
        __skb_queue_tail(&ring->queue, skb);
        pdesc->OWN = 1;
        spin_unlock_irqrestore(&priv->irq_th_lock, flags);
-       dev->trans_start = jiffies;
+       netif_trans_update(dev);
 
        rtl92e_writew(dev, TPPoll, 0x01 << tcb_desc->queue_index);
        return 0;
index de714501c996a64a152e1628201eb9425ea70918..d705595766a9d8670cec9b029ce466798398973f 100644 (file)
@@ -249,7 +249,7 @@ inline void softmac_mgmt_xmit(struct sk_buff *skb, struct ieee80211_device *ieee
                                ieee->seq_ctrl[0]++;
 
                        /* avoid watchdog triggers */
-                       ieee->dev->trans_start = jiffies;
+                       netif_trans_update(ieee->dev);
                        ieee->softmac_data_hard_start_xmit(skb,ieee->dev,ieee->basic_rate);
                        //dev_kfree_skb_any(skb);//edit by thomas
                }
@@ -302,7 +302,7 @@ inline void softmac_ps_mgmt_xmit(struct sk_buff *skb, struct ieee80211_device *i
                        ieee->seq_ctrl[0]++;
 
                /* avoid watchdog triggers */
-               ieee->dev->trans_start = jiffies;
+               netif_trans_update(ieee->dev);
                ieee->softmac_data_hard_start_xmit(skb,ieee->dev,ieee->basic_rate);
 
        }else{
@@ -2205,7 +2205,7 @@ static void ieee80211_resume_tx(struct ieee80211_device *ieee)
                                ieee->dev, ieee->rate);
                                //(i+1)<ieee->tx_pending.txb->nr_frags);
                        ieee->stats.tx_packets++;
-                       ieee->dev->trans_start = jiffies;
+                       netif_trans_update(ieee->dev);
                }
        }
 
index 849a95ef723c6e2d6602b51bbeba836b6f0ab63b..4af0140c6ead5a369797c04ca4d737cf96614097 100644 (file)
@@ -1108,7 +1108,7 @@ static void rtl8192_tx_isr(struct urb *tx_urb)
 
        if (tcb_desc->queue_index != TXCMD_QUEUE) {
                if (tx_urb->status == 0) {
-                       dev->trans_start = jiffies;
+                       netif_trans_update(dev);
                        priv->stats.txoktotal++;
                        priv->ieee80211->LinkDetectInfo.NumTxOkInPeriod++;
                        priv->stats.txbytesunicast +=
@@ -1715,7 +1715,7 @@ short rtl8192_tx(struct net_device *dev, struct sk_buff *skb)
                                return -1;
                        }
                }
-               dev->trans_start = jiffies;
+               netif_trans_update(dev);
                atomic_inc(&priv->tx_pending[tcb_desc->queue_index]);
                return 0;
        }
index 88255ce2871b5e1ad6ff7215ce38d2b30c8e8f0c..1f9dfba5dbb3a9843e60fe784ae3dd20408725ab 100644 (file)
@@ -393,7 +393,7 @@ static int p80211knetdev_hard_start_xmit(struct sk_buff *skb,
                goto failed;
        }
 
-       netdev->trans_start = jiffies;
+       netif_trans_update(netdev);
 
        netdev->stats.tx_packets++;
        /* count only the packet payload */
index c01620780f5baf503ee6c46eef9714ef9ac2bae4..0c27a00ab42dd92677bef588f9f20970d1ab9735 100644 (file)
@@ -2662,7 +2662,7 @@ static int gsm_mux_net_start_xmit(struct sk_buff *skb,
        STATS(net).tx_bytes += skb->len;
        gsm_dlci_data_kick(dlci);
        /* And tell the kernel when the last transmit started. */
-       net->trans_start = jiffies;
+       netif_trans_update(net);
        muxnet_put(mux_net);
        return NETDEV_TX_OK;
 }
index f5476e270734b24a030a2b20db04628209a25994..c8c7601510948b202ed128ec59943069ac02da55 100644 (file)
@@ -7708,7 +7708,7 @@ static netdev_tx_t hdlcdev_xmit(struct sk_buff *skb,
        dev_kfree_skb(skb);
 
        /* save start time for transmit timeout detection */
-       dev->trans_start = jiffies;
+       netif_trans_update(dev);
 
        /* start hardware transmitter if necessary */
        spin_lock_irqsave(&info->irq_spinlock,flags);
@@ -7764,7 +7764,7 @@ static int hdlcdev_open(struct net_device *dev)
        mgsl_program_hw(info);
 
        /* enable network layer transmit */
-       dev->trans_start = jiffies;
+       netif_trans_update(dev);
        netif_start_queue(dev);
 
        /* inform generic HDLC layer of current DCD status */
index c0a2f5a1b1c2d08b0534df5138b12d813f420602..d5b6471bece4c5f382f0079331f5cb7878b9a7c2 100644 (file)
@@ -1493,7 +1493,7 @@ static netdev_tx_t hdlcdev_xmit(struct sk_buff *skb,
        dev->stats.tx_bytes += skb->len;
 
        /* save start time for transmit timeout detection */
-       dev->trans_start = jiffies;
+       netif_trans_update(dev);
 
        spin_lock_irqsave(&info->lock, flags);
        tx_load(info, skb->data, skb->len);
@@ -1552,7 +1552,7 @@ static int hdlcdev_open(struct net_device *dev)
        program_hw(info);
 
        /* enable network layer transmit */
-       dev->trans_start = jiffies;
+       netif_trans_update(dev);
        netif_start_queue(dev);
 
        /* inform generic HDLC layer of current DCD status */
index 90da0c712262d81b92891aec8103c95a9df44634..3f8968543af050ca106c5c166e238b879d83d05a 100644 (file)
@@ -1612,7 +1612,7 @@ static netdev_tx_t hdlcdev_xmit(struct sk_buff *skb,
        dev_kfree_skb(skb);
 
        /* save start time for transmit timeout detection */
-       dev->trans_start = jiffies;
+       netif_trans_update(dev);
 
        /* start hardware transmitter if necessary */
        spin_lock_irqsave(&info->lock,flags);
@@ -1668,7 +1668,7 @@ static int hdlcdev_open(struct net_device *dev)
        program_hw(info);
 
        /* enable network layer transmit */
-       dev->trans_start = jiffies;
+       netif_trans_update(dev);
        netif_start_queue(dev);
 
        /* inform generic HDLC layer of current DCD status */
index 637809e3bd0d491bf2b30957c8adc87fcc9adabf..a3f7e7c55ebb18bd5045e27628c81075e484af37 100644 (file)
@@ -597,7 +597,7 @@ static netdev_tx_t eth_start_xmit(struct sk_buff *skb,
                DBG(dev, "tx queue err %d\n", retval);
                break;
        case 0:
-               net->trans_start = jiffies;
+               netif_trans_update(net);
                atomic_inc(&dev->tx_qlen);
        }
 
index cd3b37989057fd0b1c5a8b1f49a224fe96d7ba87..e574a7e9db6fbff393670af25acf0e9d0cc42749 100644 (file)
@@ -194,7 +194,7 @@ lec_send(struct atm_vcc *vcc, struct sk_buff *skb)
 static void lec_tx_timeout(struct net_device *dev)
 {
        pr_info("%s\n", dev->name);
-       dev->trans_start = jiffies;
+       netif_trans_update(dev);
        netif_wake_queue(dev);
 }
 
@@ -324,7 +324,7 @@ static netdev_tx_t lec_start_xmit(struct sk_buff *skb,
 out:
        if (entry)
                lec_arp_put(entry);
-       dev->trans_start = jiffies;
+       netif_trans_update(dev);
        return NETDEV_TX_OK;
 }
 
index 8a136b6a1ff06165b7e7c257fd8b00847fbf3065..dcb16c33cd8b52bba8c5cc55b3bc64221ce6f46c 100644 (file)
@@ -208,7 +208,7 @@ static int batadv_interface_tx(struct sk_buff *skb,
        if (atomic_read(&bat_priv->mesh_state) != BATADV_MESH_ACTIVE)
                goto dropped;
 
-       soft_iface->trans_start = jiffies;
+       netif_trans_update(soft_iface);
        vid = batadv_get_vid(skb, 0);
        ethhdr = eth_hdr(skb);
 
index 6ceb5d36a32bdc375e635d34085a9b016568e16a..f4fcb4a9d5c1ed6e3fe81190ece8aa245808b395 100644 (file)
@@ -188,7 +188,7 @@ static netdev_tx_t bnep_net_xmit(struct sk_buff *skb,
         * So we have to queue them and wake up session thread which is sleeping
         * on the sk_sleep(sk).
         */
-       dev->trans_start = jiffies;
+       netif_trans_update(dev);
        skb_queue_tail(&sk->sk_write_queue, skb);
        wake_up_interruptible(sk_sleep(sk));
 
index fcfbe579434ae8d4ffb989f0ac82b250512c5637..d8b7267280c38fdea5930764d5ca8d2b11746fd7 100644 (file)
@@ -181,7 +181,7 @@ static netdev_tx_t irlan_eth_xmit(struct sk_buff *skb,
                skb = new_skb;
        }
 
-       dev->trans_start = jiffies;
+       netif_trans_update(dev);
 
        len = skb->len;
        /* Now queue the packet in the transport layer */
index 9c7756237904e36c98c3a47c8fa27e1acf9ca992..70182cfe119c6f51d7c4cbfeafabfdb0655708e3 100644 (file)
@@ -775,7 +775,7 @@ void dev_activate(struct net_device *dev)
                transition_one_qdisc(dev, dev_ingress_queue(dev), NULL);
 
        if (need_watchdog) {
-               dev->trans_start = jiffies;
+               netif_trans_update(dev);
                dev_watchdog_up(dev);
        }
 }