Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1ae5dc34 authored by Eric Dumazet's avatar Eric Dumazet Committed by David S. Miller
Browse files

net: trans_start cleanups



Now that core network takes care of trans_start updates, dont do it
in drivers themselves, if possible. Drivers can avoid one cache miss
(on dev->trans_start) in their start_xmit() handler.

Exceptions are NETIF_F_LLTX drivers

Signed-off-by: default avatarEric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 2b0b05dd
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -480,7 +480,6 @@ static netdev_tx_t el_start_xmit(struct sk_buff *skb, struct net_device *dev)
			/* fire ... Trigger xmit.  */
			outb(AX_XMIT, AX_CMD);
			lp->loading = 0;
			dev->trans_start = jiffies;
			if (el_debug > 2)
				pr_debug(" queued xmit.\n");
			dev_kfree_skb(skb);
+1 −6
Original line number Diff line number Diff line
@@ -1055,7 +1055,7 @@ static void elp_timeout(struct net_device *dev)
		   (stat & ACRF) ? "interrupt" : "command");
	if (elp_debug >= 1)
		pr_debug("%s: status %#02x\n", dev->name, stat);
	dev->trans_start = jiffies;
	dev->trans_start = jiffies; /* prevent tx timeout */
	dev->stats.tx_dropped++;
	netif_wake_queue(dev);
}
@@ -1093,11 +1093,6 @@ static netdev_tx_t elp_start_xmit(struct sk_buff *skb, struct net_device *dev)
	if (elp_debug >= 3)
		pr_debug("%s: packet of length %d sent\n", dev->name, (int) skb->len);

	/*
	 * start the transmit timeout
	 */
	dev->trans_start = jiffies;

	prime_rx(dev);
	spin_unlock_irqrestore(&adapter->lock, flags);
	netif_start_queue(dev);
+1 −2
Original line number Diff line number Diff line
@@ -504,7 +504,7 @@ static void el16_tx_timeout (struct net_device *dev)
		outb (0, ioaddr + SIGNAL_CA);	/* Issue channel-attn. */
		lp->last_restart = dev->stats.tx_packets;
	}
	dev->trans_start = jiffies;
	dev->trans_start = jiffies; /* prevent tx timeout */
	netif_wake_queue (dev);
}

@@ -528,7 +528,6 @@ static netdev_tx_t el16_send_packet (struct sk_buff *skb,

	hardware_send_packet (dev, buf, skb->len, length - skb->len);

	dev->trans_start = jiffies;
	/* Enable the 82586 interrupt input. */
	outb (0x84, ioaddr + MISC_CTRL);

+1 −2
Original line number Diff line number Diff line
@@ -807,7 +807,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;
	dev->trans_start = jiffies; /* prevent tx timeout */
	/* Issue TX_RESET and TX_START commands. */
	outw(TxReset, ioaddr + EL3_CMD);
	outw(TxEnable, ioaddr + EL3_CMD);
@@ -868,7 +868,6 @@ el3_start_xmit(struct sk_buff *skb, struct net_device *dev)
	/* ... and the packet rounded to a doubleword. */
	outsl(ioaddr + TX_FIFO, skb->data, (skb->len + 3) >> 2);

	dev->trans_start = jiffies;
	if (inw(ioaddr + TX_FREE) > 1536)
		netif_start_queue(dev);
	else
+1 −3
Original line number Diff line number Diff line
@@ -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;
	dev->trans_start = jiffies; /* prevent tx timeout */
	dev->stats.tx_errors++;
	dev->stats.tx_dropped++;
	netif_wake_queue(dev);
@@ -1055,7 +1055,6 @@ static netdev_tx_t corkscrew_start_xmit(struct sk_buff *skb,
				prev_entry->status &= ~0x80000000;
			netif_wake_queue(dev);
		}
		dev->trans_start = jiffies;
		return NETDEV_TX_OK;
	}
	/* Put out the doubleword header... */
@@ -1091,7 +1090,6 @@ static netdev_tx_t corkscrew_start_xmit(struct sk_buff *skb,
		outw(SetTxThreshold + (1536 >> 2), ioaddr + EL3_CMD);
#endif				/* bus master */

	dev->trans_start = jiffies;

	/* Clear the Tx status stack. */
	{
Loading